// The file contains a description of the standard functions. Here, also, you can add your own
// Function descriptions are taken (mostly) from the documentation "BIS Fallout 2 Script Compiler Functions" from Wasteland Ghost.
// Edit this file most conveniently by opening it in the script editor.
//
// Structure:
// "function name"<d>"short description of the function"<s>"code that will be inserted into the script"<cr>
// <m> "node name menu"
// <m+> "name for sub node"
// <m-> close menu node.
// <-> delimiter (only for the top level)
// <cr> carriage return to a new line (optional)
//
// In the "Menu Node", "function name", "short description of the function" and
// "code that will be inserted into the script" can contain any characters, except control characters.
//
// The source file is borrowed from the program of the script constructors "F-Geck" by Tehnokrat.
//
<m>Constructors
<m+>Keywords
call<d>Calls a procedure<s>call {procedure};
call [delay]<d>Calling the procedure with a delay. Delay in seconds<s>call {procedure} in {delay};
call [condition]<d>Calling a procedure by condition<s>call {procedure} when {condition};
return<d>Return value or exit current procedure<s>return;<cr>
Cancel<d>[void] Cancels call to pending procedure in stack<s>Cancel({procedure procedure_name});<cr>
CancelAll<d>[void] Cancels call of all pending procedures in stack<s>CancelAll;<cr>
spawn<d>[void] Generates specified script<s>spawn({string int_file_name});<cr>
fork<d>[void] Calls specified script<s>fork({string int_file_name});<cr>
wait<d>[void] Stops game for specified time<s>wait({int time});<cr>
exit<d>Terminates execution of script that called command<s>exit;<cr>
critical block<d>Declares an entire procedure as critical. Critical code executes in sequential order.<s>startcritical;<cr><cr>endcritical;<cr>
<m->
<m+>Declaration
variable<d>Declaring a variable<s>variable {name};
export variable<d>Exporting variable<s>export variable {name};
import variable<d>Importing variable<s>import variable {name};
procedure<d>Declaration of procedure<s>procedure {name};
export procedure<d>Exporting procedure<s>export procedure {name};
import procedure<d>Importing procedure<s>import procedure {name};
critical procedure<d>Declares a block of code as critical. Critical code executes in sequential order.<s>critical procedure {name};
<m->
<m+>Conditional Operators
switch<d>Conditional operator<s>switch ({condition}) begin<cr>   case {constant} : {code}<cr>   default : {code}<cr>end<cr>
if ... then ... <d>Conditional operator<s>if {condition} then
if ... then begin ... end<d>Conditional operator<s>if {condition} then begin<cr><cr>end<cr>
if ... then ... else ...<d>Conditional operator<s>if {condition} then<cr>else
if ... then ... else if ...<d>Conditional operator<s>if {condition} then<cr>else if {condition} then
if ... then begin ... end else begin ... end<d>Conditional operator<s>if {condition} then begin<cr><cr>end else begin<cr><cr>end<cr>
if ... then begin ... end else if begin ... end<d>Conditional operator<s>if {condition} then begin<cr><cr>end else if {condition} then begin<cr><cr>end<cr>
<m->
<m+>Lood Operators
while ... do ...<d>Loop statement: executes while condition is true<s>while ({condition}) do
while ... do begin...end<d>Loop statement: executes while condition is true<s>while ({condition}) do begin<cr><cr>end<cr>
for... begin<d>Loop operator (sfall function).<s>for ({iterator} := 0; {condition}; {iterator}++) begin<cr><cr>end<cr>
foreach ... begin<d>Loop operator (sfall function).<s>foreach ({item} in {array}) begin<cr><cr>end<cr>
foreach (iterator) begin<d>Loop operator with iterator (sfall function).<s>foreach ({iterator} : {item} in {array}) begin<cr><cr>end<cr>
<m->
<m+>Preprocessor instructions
#define<d>Operator for defining macros<s>#define 
#include<d>Including header files in script<s>#include 
#ifdef ... #endif<d><s>#if <cr><cr>#else<cr><cr>#endif<cr>
#if ... #endif<d><s>#ifdef <cr><cr>#else<cr><cr>#endif<cr>
Standart includes *.h<d>Includes standard header files<s>#include "..\headers\define.h"<cr>#include "..\headers\command.h"<cr>
<m->
<m+>Constants compilation
RELEASE<d>Constant for release compilation.<s>#define RELEASE               (1)<cr>
DEBUG<d>Constant for compilation with debugging information.<s>#define DEBUG                 (1)<cr>
SFALL_SC_EVALUATION<d>Definition for editor instruct to sfall compiler, to compile script with short-circuit evaluation option.<s>#define SFALL_SC_EVALUATION   (true) // Automatic script compilation with -s option<cr>
<m->
<->
<m>Sfall Definitions (sfall.h)
<m+>Game mode flags
WORLDMAP<d>Value: 0x1<s>WORLDMAP
LOCALMAP<d>Value: 0x2<s>LOCALMAP
DIALOG<d>Value: 0x4<s>DIALOG
ESCMENU<d>Value: 0x8<s>ESCMENU
SAVEGAME<d>Value: 0x10<s>SAVEGAME
LOADGAME<d>Value: 0x20<s>LOADGAME
COMBAT<d>Value: 0x40<s>COMBAT
OPTIONS<d>Value: 0x80<s>OPTIONS
HELP<d>Value: 0x100<s>HELP
CHARSCREEN<d>Value: 0x200<s>CHARSCREEN
PIPBOY<d>Value: 0x400<s>PIPBOY
PCOMBAT<d>Value: 0x800<s>PCOMBAT
INVENTORY<d>Value: 0x1000<s>INVENTORY
AUTOMAP<d>Value: 0x2000<s>AUTOMAP
SKILLDEX<d>Value: 0x4000<s>SKILLDEX
INTFACEUSE<d>Value: 0x8000<s>INTFACEUSE
INTFACELOOT<d>Value: 0x10000<s>INTFACELOOT
BARTER<d>Value: 0x20000<s>BARTER
HEROWIN<d>Value: 0x40000<s>HEROWIN
DIALOGVIEW<d>Value: 0x80000<s>DIALOGVIEW
COUNTERWIN<d>Value: 0x100000<s>COUNTERWIN
SPECIAL<d>Value: 0x80000000<s>SPECIAL
<m->
<m+>Hooks
HOOK_TOHIT<d>ID value: 0<s>HOOK_TOHIT
HOOK_AFTERHITROLL<d>ID value: 1<s>HOOK_AFTERHITROLL
HOOK_CALCAPCOST<d>ID value: 2<s>HOOK_CALCAPCOST
HOOK_DEATHANIM1<d>ID value: 3<s>HOOK_DEATHANIM1
HOOK_DEATHANIM2<d>ID value: 4<s>HOOK_DEATHANIM2
HOOK_COMBATDAMAGE<d>ID value: 5<s>HOOK_COMBATDAMAGE
HOOK_ONDEATH<d>ID value: 6<s>HOOK_ONDEATH
HOOK_FINDTARGET<d>ID value: 7<s>HOOK_FINDTARGET
HOOK_USEOBJON<d>ID value: 8<s>HOOK_USEOBJON
HOOK_REMOVEINVENOBJ<d>ID value: 9<s>HOOK_REMOVEINVENOBJ
HOOK_BARTERPRICE<d>ID value: 10<s>HOOK_BARTERPRICE
HOOK_MOVECOST<d>ID value: 11<s>HOOK_MOVECOST
HOOK_HEXMOVEBLOCKING<d>ID value: 12<s>HOOK_HEXMOVEBLOCKING
HOOK_HEXAIBLOCKING<d>ID value: 13<s>HOOK_HEXAIBLOCKING
HOOK_HEXSHOOTBLOCKING<d>ID value: 14<s>HOOK_HEXSHOOTBLOCKING
HOOK_HEXSIGHTBLOCKING<d>ID value: 15<s>HOOK_HEXSIGHTBLOCKING
HOOK_ITEMDAMAGE<d>ID value: 16<s>HOOK_ITEMDAMAGE
HOOK_AMMOCOST<d>ID value: 17<s>HOOK_AMMOCOST
HOOK_USEOBJ<d>ID value: 18<s>HOOK_USEOBJ
HOOK_KEYPRESS<d>ID value: 19<s>HOOK_KEYPRESS
HOOK_MOUSECLICK<d>ID value: 20<s>HOOK_MOUSECLICK
HOOK_USESKILL<d>ID value: 21<s>HOOK_USESKILL
HOOK_STEAL<d>ID value: 22<s>HOOK_STEAL
HOOK_WITHINPERCEPTION<d>ID value: 23<s>HOOK_WITHINPERCEPTION
HOOK_INVENTORYMOVE<d>ID value: 24<s>HOOK_INVENTORYMOVE
HOOK_INVENWIELD<d>ID value: 25<s>HOOK_INVENWIELD
HOOK_ADJUSTFID<d>ID value: 26<s>HOOK_ADJUSTFID
HOOK_COMBATTURN<d>ID value: 27<s>HOOK_COMBATTURN
HOOK_CARTRAVEL<d>ID value: 28<s>HOOK_CARTRAVEL
HOOK_SETGLOBALVAR<d>ID value: 29<s>HOOK_SETGLOBALVAR
HOOK_RESTTIMER<d>ID value: 30<s>HOOK_RESTTIMER
HOOK_GAMEMODECHANGE<d>ID value: 31<s>HOOK_GAMEMODECHANGE
HOOK_USEANIMOBJ<d>ID value: 32<s>HOOK_USEANIMOBJ
HOOK_EXPLOSIVETIMER<d>ID value: 33<s>HOOK_EXPLOSIVETIMER
HOOK_DESCRIPTIONOBJ<d>ID value: 34<s>HOOK_DESCRIPTIONOBJ
HOOK_USESKILLON<d>ID value: 35<s>HOOK_USESKILLON
HOOK_ONEXPLOSION<d>ID value: 36<s>HOOK_ONEXPLOSION
HOOK_SUBCOMBATDAMAGE<d>ID value: 37<s>HOOK_SUBCOMBATDAMAGE
HOOK_SETLIGHTING<d>ID value: 38<s>HOOK_SETLIGHTING
HOOK_SNEAK<d>ID value: 39<s>HOOK_SNEAK
HOOK_STDPROCEDURE<d>ID value: 40<s>HOOK_STDPROCEDURE
HOOK_STDPROCEDURE_END<d>ID value: 41<s>HOOK_STDPROCEDURE_END
HOOK_TARGETOBJECT<d>ID value: 42<s>HOOK_TARGETOBJECT
HOOK_ENCOUNTER<d>ID value: 43<s>HOOK_ENCOUNTER
<m->
<m>Standart Definitions (Define.h)
<m+>Color float messages
FLOAT_MSG_WARNING<d>Warning color<s>FLOAT_MSG_WARNING
FLOAT_MSG_SEQUENTIAL<d>Hostile color<s>FLOAT_MSG_SEQUENTIAL
FLOAT_MSG_NORMAL<d>Normal color<s>FLOAT_MSG_NORMAL
FLOAT_MSG_BLACK<d>Black color<s>FLOAT_MSG_BLACK
FLOAT_MSG_RED<d>Red color<s>FLOAT_MSG_RED
FLOAT_MSG_GREEN<d>Green color<s>FLOAT_MSG_GREEN
FLOAT_MSG_BLUE<d>Blue color<s>FLOAT_MSG_BLUE
FLOAT_MSG_PURPLE<d>Purple color<s>FLOAT_MSG_PURPLE
FLOAT_MSG_NEAR_WHITE<d>Near white color<s>FLOAT_MSG_NEAR_WHITE
FLOAT_MSG_LIGHT_RED<d>Light red color<s>FLOAT_MSG_LIGHT_RED
FLOAT_MSG_YELLOW<d>Yellow color<s>FLOAT_MSG_YELLOW
FLOAT_MSG_WHITE<d>White<s>FLOAT_MSG_WHITE
FLOAT_MSG_GREY<d>Grey color<s>FLOAT_MSG_GREY
FLOAT_MSG_DARK_GREY<d>Dark gray color<s>FLOAT_MSG_DARK_GREY
FLOAT_MSG_LIGHT_GREY<d>Light grey color<s>FLOAT_MSG_LIGHT_GREY
<m->
<m+>Skills
SKILL_SMALL_GUNS<d>Light weapons skill<s>SKILL_SMALL_GUNS
SKILL_BIG_GUNS<d>Heavy weapons skill<s>SKILL_BIG_GUNS
SKILL_ENERGY_WEAPONS<d>Energy weapons skill<s>SKILL_ENERGY_WEAPONS
SKILL_UNARMED_COMBAT<d>Unarmed skill<s>SKILL_UNARMED_COMBAT
SKILL_MELEE<d>Melee skill<s>SKILL_MELEE
SKILL_THROWING<d>Throwing weapons skill<s>SKILL_THROWING
SKILL_FIRST_AID<d>First aid skill<s>SKILL_FIRST_AID
SKILL_DOCTOR<d>Doctor skill<s>SKILL_DOCTOR
SKILL_SNEAK<d>Sneak skill<s>SKILL_SNEAK
SKILL_LOCKPICK<d>Lockpick skill<s>SKILL_LOCKPICK
SKILL_STEAL<d>Steal skill<s>SKILL_STEAL
SKILL_TRAPS<d>Traps skill<s>SKILL_TRAPS
SKILL_SCIENCE<d>Science skill<s>SKILL_SCIENCE
SKILL_REPAIR<d>Repairs skill<s>SKILL_REPAIR
SKILL_CONVERSANT<d>Conversation skill<s>SKILL_CONVERSANT
SKILL_BARTER<d>Trade skill<s>SKILL_BARTER
SKILL_GAMBLING<d>Gamming skill<s>SKILL_GAMBLING
SKILL_OUTDOORSMAN<d>Outdoorsman skill<s>SKILL_OUTDOORSMAN
<m->
<m+>Time (Ticks)
ONE_GAME_SECOND<d>One second in ticks<s>ONE_GAME_SECOND
ONE_GAME_MINUTE<d>One minute in ticks<s>ONE_GAME_MINUTE
ONE_GAME_HOUR<d>One hour in ticks<s>ONE_GAME_HOUR
ONE_GAME_DAY<d>A day in ticks<s>ONE_GAME_DAY
ONE_GAME_WEEK<d>Week in ticks<s>ONE_GAME_WEEK
ONE_GAME_MONTH<d>Month in ticks<s>ONE_GAME_MONTH
<m->
<m+>Stats
STAT_st<d>Strength<s>STAT_st
STAT_pe<d>Perception<s>STAT_pe
STAT_en<d>Endurance<s>STAT_en
STAT_ch<d>Charisma<s>STAT_ch
STAT_iq<d>Intelligence<s>STAT_iq
STAT_ag<d>Agility<s>STAT_ag
STAT_lu<d>Luck<s>STAT_lu
STAT_max_hit_points<d>Value: (7)<s>STAT_max_hit_points
STAT_max_move_points<d>Value: (8)<s>STAT_max_move_points
STAT_ac<d>Value: (9)<s>STAT_ac
STAT_unarmed_dmg<d>Value: (10)<s>STAT_unarmed_dmg
STAT_unused<d>Value: (10)<s>STAT_unused
STAT_melee_dmg<d>Value: (11)<s>STAT_melee_dmg
STAT_carry_amt<d>Value: (12)<s>STAT_carry_amt
STAT_sequence<d>Value: (13)<s>STAT_sequence
STAT_heal_rate<d>Value: (14)<s>STAT_heal_rate
STAT_crit_chance<d>Value: (15)<s>STAT_crit_chance
STAT_better_crit<d>Value: (16)<s>STAT_better_crit
STAT_dmg_thresh<d>Value: (17)<s>STAT_dmg_thresh
STAT_dmg_thresh_laser<d>Value: (18)<s>STAT_dmg_thresh_laser
STAT_dmg_thresh_fire<d>Value: (19)<s>STAT_dmg_thresh_fire
STAT_dmg_thresh_plasma<d>Value: (20)<s>STAT_dmg_thresh_plasma
STAT_dmg_thresh_electrical<d>Value: (21)<s>STAT_dmg_thresh_electrical
STAT_dmg_thresh_emp<d>Value: (22)<s>STAT_dmg_thresh_emp
STAT_dmg_thresh_explosion<d>Value: (23)<s>STAT_dmg_thresh_explosion
STAT_dmg_resist<d>Value: (24)<s>STAT_dmg_resist
STAT_dmg_resist_laser<d>Value: (25)<s>STAT_dmg_resist_laser
STAT_dmg_resist_fire<d>Value: (26)<s>STAT_dmg_resist_fire
STAT_dmg_resist_plasma<d>Value: (27)<s>STAT_dmg_resist_plasma
STAT_dmg_resist_electrical<d>Value: (28)<s>STAT_dmg_resist_electrical
STAT_dmg_resist_emp<d>Value: (29)<s>STAT_dmg_resist_emp
STAT_dmg_resist_explosion<d>Value: (30)<s>STAT_dmg_resist_explosion
STAT_rad_resist<d>Value: (31)<s>STAT_rad_resist
STAT_poison_resist<d>Value: (32)<s>STAT_poison_resist
STAT_age<d>Value: (33)<s>STAT_age
STAT_gender<d>Value: (34)<s>STAT_gender
STAT_current_hp<d>Value: (35)<s>STAT_current_hp
STAT_current_poison<d>Value: (36)<s>STAT_current_poison
STAT_current_rad<d>Value: (37)<s>STAT_current_rad
STAT_real_max_stat<d>Value: (38)<s>STAT_real_max_stat
<m->
<m+>Object Types (define_extra.h)
<m+>Item subtypes
item_type_armor<d>Value: 0<s>item_type_armor
item_type_container<d>Value: 1<s>item_type_container
item_type_drug<d>Value: 2<s>item_type_drug
item_type_weapon<d>Value: 3<s>item_type_weapon
item_type_ammo<d>Value: 4<s>item_type_ammo
item_type_misc_item<d>Value: 5<s>item_type_misc_item
item_type_key_item<d>Value: 6<s>item_type_key_item
<m->
OBJ_TYPE_ITEM<d>Value: (0)<s>OBJ_TYPE_ITEM
OBJ_TYPE_CRITTER<d>Value: (1)<s>OBJ_TYPE_CRITTER
OBJ_TYPE_SCENERY<d>Value: (2)<s>OBJ_TYPE_SCENERY
OBJ_TYPE_WALL<d>Value: (3)<s>OBJ_TYPE_WALL
OBJ_TYPE_TILE<d>Value: (4)<s>OBJ_TYPE_TILE
OBJ_TYPE_MISC<d>Value: (5)<s>OBJ_TYPE_MISC
OBJ_TYPE_SPATIAL<d>Value: (6)<s>OBJ_TYPE_SPATIAL
<m->
<m+>Damages types
DMG_normal_dam<d>Value: 0<s>DMG_normal_dam
DMG_laser<d>Value: 1<s>DMG_laser
DMG_fire<d>Value: 2<s>DMG_fire
DMG_plasma<d>Value: 3<s>DMG_plasma
DMG_electrical<d>Value: 4<s>DMG_electrical
DMG_emp<d>Value: 5<s>DMG_emp
DMG_explosion<d>Value: 6<s>DMG_explosion
DMG_BYPASS_ARMOR<d>Value: 256 (These are BWOR'd indicates to ignore the armor when inflicting damage).<s>DMG_BYPASS_ARMOR
DMG_NOANIMATE<d>Value: 512 (These are BWOR'd indicates not to play animation when doing damage).<s>DMG_NOANIMATE
<m->
<->
<m>Script Functions
<m+>Common functions script
floor<d>[int] Returns an integer that is rounded down.<s>floor({float})
Tokenize<d>[string] Parses a string to retrieve values stored in the form of a list delimited by a single character<s>Tokenize({string strMain}, {string token}, {char delimiter});
action_being_used<d>[int] Returns number of skill used on object<s>action_being_used;<cr>
dude_obj<d>[ObjectPtr] Returns pointer to player<s>dude_obj
fixed_param<d>[int] Returns value of a fixed script parameter<s>fixed_param
obj_being_used_with<d>[ObjectPtr] Returns a pointer to object currently in use on object from which script is called<s>obj_being_used_with;<cr>
random<d>[int] Returns a random number in range min...max, inclusive<s>random({int min}, {int max})
scr_return<d>[void] Sets value returned by script to use C-code engine<s>scr_return({int value});<cr>
script_action<d>[int] Returns action that activated script<s>script_action
script_overrides<d>[void] Tell C-engine that script overrides standard behavior of object<s>script_overrides;<cr>
self_obj<d>[ObjectPtr] Returns a pointer to object in script that is executed.<s>self_obj
source_obj<d>[ObjectPtr] Returns a pointer to object that called handler.<s>source_obj
target_obj<d>[ObjectPtr] Returns a pointer to object on which action is performed.<s>target_obj
<m->
<m+>Timer events
add_timer_event<d>[void] Add event timer.<s>add_timer_event({ObjectPtr obj}, {int time}, {int info});<cr>
rm_timer_event<d>[void] Clears all event timer on object.<s>rm_timer_event({ObjectPtr who});<cr>
rm_fixed_timer_event<d>[void] Clears event timer for a specified object.<s>rm_fixed_timer_event({ObjectPtr who}, {int fixed_val});<cr>
<m+>Macros
flush_add_timer_event<d>[void] Clears all timer events on specified object, and adds a new event to it.<s>flush_add_timer_event({ObjectPtr who}, {int time},{int fixed_param});<cr>
flush_add_timer_event_sec<d>[void] Clears all events by timer on a given object, and appends a new event in seconds.<s>flush_add_timer_event_sec({ObjectPtr who}, {int sec_time},{int fixed_param});<cr>
<m->
<m->
<m>Common function for all objects
<m+>Creation and destroy objects
create_object_sid<d>[ObjectPtr] Create object<s>create_object_sid({int pid}, {int tile_num}, {int elev}, {int sid});<cr>
destroy_object<d>[int] Destroys an object<s>destroy_object({ObjectPtr obj});<cr>
destroy_mult_objs<d>[int] Destroys specified number of copies of item<s>destroy_mult_objs({ObjectPtr item}, {int count});<cr>
<m->
<m+>Properties (flags) objects
obj_is_locked<d>[Boolean] Checks if this object is locked<s>obj_is_locked({ObjectPtr what})
obj_is_open<d>[Boolean] Checks if specified object is open<s>obj_is_open({ObjectPtr what})
obj_on_screen<d>[Boolean] Checks whether object is visible on game screen<s>obj_on_screen({ObjectPtr what})
set_obj_visibility<d>[void] Sets object's visibility flag<s>set_obj_visibility({ObjectPtr obj}, {boolean visibility});<cr>
obj_set_light_level<d>[void] Makes an object a light source<s>obj_set_light_level({ObjectPtr obj}, {int intensity}, {int distance});<cr>
<m->
<m+>Prototype data
obj_art_fid<d>[int] Returns frame identifier (FID) of object<s>obj_art_fid({ObjectPtr obj})
obj_item_subtype<d>[int] Returns subtype of an item<s>obj_item_subtype({ObjectPtr obj})
obj_name<d>[string] Returns name of object<s>obj_name({ObjectPtr what})
obj_pid<d>[int] Returns identifier of prototype (pid) of object<s>obj_pid({ObjectPtr obj})
obj_type<d>[int] Returns object type<s>obj_type({ObjectPtr obj})
proto_data<d>[int/string] Returns value of data from prototype object<s>proto_data({int pid}, {int data_member})
<m->
<m+>Using objects
jam_lock<d>[void] It jams object, which becomes impossible to open for about 24 game hours<s>jam_lock({ObjectPtr lockableObj});<cr>
obj_close<d>[void] Attempts to close an object<s>obj_close({ObjectPtr what});<cr>
obj_lock<d>[void] Attempts to lock an object<s>obj_lock({ObjectPtr what});<cr>
obj_open<d>[void] Attempts to open an object<s>obj_open({ObjectPtr what});<cr>
obj_unlock<d>[void] Tries to unlock an object<s>obj_unlock({ObjectPtr what});<cr>
use_obj<d>[ObjectPtr] Use object<s>use_obj({ObjectPtr obj});<cr>
use_obj_on_obj<d>[void] The command to use item object on targetObj object<s>use_obj_on_obj({ObjectPtr item}, {ObjectPtr targetObj});<cr>
<m->
<m+>Macros
create_object<d>[ObjectPtr] Create object<s>create_object({int pid}, {int tile_num}, {int elev})
self_pid<d>[int] Returns PID of object in which script is executed<s>self_pid
self_fid<d>[int] Returns FID of object in which script is executed.<s>self_fid
<m->
<m>Functions specific to critter
<m+>Statistics critter
critter_add_trait<d>[int] Adds specified property to critters<s>critter_add_trait({ObjectPtr who}, {int trait_type}, {int trait}, {int amount});<cr>
critter_mod_skill<d>[void] Change value of critter skill<s>critter_mod_skill({ObjectPtr who}, {int skill}, {int amount});<cr>
critter_rm_trait<d>[void] Delete trait/perk<s>critter_rm_trait({ObjectPtr who}, {int trait_type}, {int trait}, {int amount});<cr>
critter_state<d>[int] Return object state<s>critter_state({ObjectPtr who})
drug_influence<d>[Boolean] Checks if critter is under influence of drugs<s>drug_influence({ObjectPtr who})
get_critter_stat<d>[int] Return characteristic value<s>get_critter_stat({ObjectPtr who}, {int stat})
get_pc_stat<d>[int] Returns player's characteristic values<s>get_pc_stat({int pcStat})
get_poison<d>[int] Return poisoning level of critter<s>get_poison({ObjectPtr who})
give_exp_points<d>[void] Add experience points to player<s>give_exp_points({int points});<cr>
has_skill<d>[int] Checking level of a certain skill<s>has_skill({ObjectPtr who}, {int skill})
has_trait<d>[int] Return value of specified property<s>has_trait({int trait_type}, {ObjectPtr who}, {int trait})
is_skill_tagged<d>[Boolean] Check if specified skill is marked as tagged<s>is_skill_tagged({int skillNum})
player_kill_count<d>[int] The number of killers critters<s>player_kill_count({int type})
set_critter_stat<d>[int] Set characteristic value<s>set_critter_stat({ObjectPtr who}, {int stat}, {int val});<cr>
<m->
<m+>Damage
critter_dmg<d>[void] Apply specified damage to critter in specified way<s>critter_dmg({ObjectPtr who}, {int dmg_amount}, {int dmg_type});<cr>
critter_heal<d>[void] Heals/Removes a specified number of hit points<s>critter_heal({ObjectPtr who}, {int amount});<cr>
critter_injure<d>[void] Inflicts damage to Critter (break his leg, break his arm, blind, skip a move, etc.)<s>critter_injure({ObjectPtr who}, {int how});<cr>
poison<d>[void] Change level of poisoning of critter<s>poison({ObjectPtr who}, {int amount});<cr>
radiation_dec<d>[void] Reduce exposure of critical<s>radiation_dec({ObjectPtr who}, {int amount});<cr>
radiation_inc<d>[void] Increase exposure to critical<s>radiation_inc({ObjectPtr who}, {int amount});<cr>
<m->
<m+>Properties (flags)
critter_is_fleeing<d>[Boolean] Checks whether critter runs off battlefield<s>critter_is_fleeing({ObjectPtr who})
critter_set_flee_state<d>[void] Set flag FLEE (runs away from battlefield)<s>critter_set_flee_state({ObjectPtr who}, {boolean flee_on});<cr>
critter_stop_attacking<d>[void] Set a flag indicating that critic does not want to continue fight<s>critter_stop_attacking({ObjectPtr who});<cr>
<m->
<m+>Macros
critter_damage<d>[void] Apply specified critter damage<s>critter_damage({ObjectPtr who}, {int dmg_amount});<cr>
critter_skill_level<d>[int] Get current skill level<s>critter_skill_level({ObjectPtr who}, {int skillNum})
critter_uninjure<d>[void] Removes critter damage (break a leg, break an arm, etc.)<s>critter_uninjure({ObjectPtr who}, {int how});<cr>
obj_get_rot<d>[int] Returns view direction (0...5)<s>obj_get_rot({ObjectPtr who})
obj_is_visible_flag<d>[Boolean] Checks whether object is visible<s>obj_is_visible_flag({ObjectPtr what})
who_carry_amount<d>[int] Returns current weight of object<s>who_carry_amount({ObjectPtr who})
critter_weight<d>[int] Returns maximum carry weight for criter<s>critter_weight({ObjectPtr who})
chem_use_level<d>[int] Returns level used by critter chemistry<s>chem_use_level({ObjectPtr who})
<m+>Statistics
self_name<d>[int] Returns name of object<s>self_name
self_gender<d>[int] Returns gender of object<s>self_gender
self_strength<d>[int] Returns strength value<s>self_strength
self_perception<d>[int] Returns value of perception<s>self_perception
self_endurance<d>[int] Returns value of endurance<s>self_endurance
self_charisma<d>[int] Returns value of charisma<s>self_charisma
self_iq<d>[int] Returns value of intelligence<s>self_iq
self_agility<d>[int] Returns value of agility<s>self_agility
self_luck<d>[int] Returns value of luck<s>self_luck
self_cur_hits<d>[int] Returns current number of lives<s>self_cur_hits
self_max_hits<d>[int] Returns maximum number of lives<s>self_max_hits
self_is_poisoned<d>[int] Checks or returns poison level of an object<s>self_is_poisoned
self_team<d>[int] Returns team number, which is a critter<s>self_team
self_ai<d>[int] Returns AI number criter<s>self_ai
dude_strength<d>[int] Returns strength value of player<s>dude_strength
dude_perception<d>[int] Returns value of perception of player<s>dude_perception
dude_endurance<d>[int] Returns player's endurance value<s>dude_endurance
dude_charisma<d>[int] Returns value of player's charisma<s>dude_charisma
dude_iq<d>[int] Returns player's intelligence value<s>dude_iq
dude_agility<d>[int] Returns Agility of player<s>dude_agility
dude_luck<d>[int] Returns value of luck of player<s>dude_luck
dude_name<d>[string] Returns name of player<s>dude_name
dude_gender<d>[int] Returns value of gender of player<s>dude_gender
dude_age<d>[int] Returns age of player<s>dude_age
dude_weight<d>[int] Returns maximum carry weight for player<s>dude_weight
dude_level<d>[int] Returns player's level.<s>dude_level
dude_cur_hits<d>[int] Returns player's current health points<s>dude_cur_hits
dude_max_hits<d>[int] Returns maximum number of player's health points<s>dude_max_hits
dude_is_poisoned<d>[int] Checks or returns poisoning level of player<s>dude_is_poisoned
dude_is_irradiated<d>[int] Checks or returns level of radioactive exposure of player<s>dude_is_irradiated
<m->
<m->
<m+>Condition Macros
critter_is_male<d>[Boolean] Checks whether a male critter<s>critter_is_male
critter_is_female<d>[Boolean] Checks whether a female critter<s>critter_is_female
self_is_male<d>[Boolean] Checks object on male gender<s>self_is_male
self_is_female<d>[Boolean] Checks object for a female gender<s>self_is_female
self_is_high<d>[Boolean] Checks whether object under influence of drugs<s>self_is_high
dude_is_male<d>[Boolean] Checks player on male gender<s>dude_is_male
dude_is_female<d>[Boolean] Checks player on female gender<s>dude_is_female
dude_is_addict<d>[Boolean] Checks whether player trait Drug_Addict<s>dude_is_addict
dude_is_high<d>[Boolean] Checks if player is under influence of drugs<s>dude_is_high
dude_is_pornstar<d>[Boolean] Checks is a porn star player<s>dude_is_pornstar
dude_is_stupid<d>[Boolean] Checks player's intelligence, less than or equal to three<s>dude_is_stupid
dude_is_sneaking<d>[Boolean] Checks player to use Sneaking skill<s>dude_is_sneaking
dude_is_crippled<d>[Boolean] Checks player for damaged limbs<s>dude_is_crippled
dude_is_walking<d>[Boolean] Checks player's animation, True if player is Walk<s>dude_is_walking
dude_is_running<d>[Boolean] Checks player's animation, True if player Runs<s>dude_is_running
<m->
<m>Inventory
<m+>Add/Delete/Move
add_mult_objs_to_inven<d>[void] Add specified number of units item to inventory object.<s>add_mult_objs_to_inven({ObjectPtr who}, {ObjectPtr item}, {int count});<cr>
add_obj_to_inven<d>[void] Add item to inventory.<s>add_obj_to_inven({ObjectPtr who}, {ObjectPtr item});<cr>
item_caps_adjust<d>[int] Changes amount of money object has.<s>item_caps_adjust({ObjectPtr obj}, {int amount});<cr>
move_obj_inven_to_obj<d>[void] Moves inventory of srcObj object to inventory of destObj object.<s>move_obj_inven_to_obj({ObjectPtr srcObj}, {ObjectPtr destObj});<cr>
rm_mult_objs_from_inven<d>[int] Deletes several instances of specified object from inventory of another object.<s>rm_mult_objs_from_inven({ObjectPtr who}, {ObjectPtr obj}, {int count});<cr>
rm_obj_from_inven<d>[void] Removes an object from inventory of another object.<s>rm_obj_from_inven({ObjectPtr who}, {ObjectPtr obj});<cr>
<m->
<m+>Statistics/Addresses
critter_inven_obj<d>[ObjectPtr,int] Returns a pointer to an object in slot of heap or total number of objects in inventory.<s>critter_inven_obj({ObjectPtr who}, {int where})
inven_cmds<d>[ObjectPtr] Returns a pointer to an object in inventory.<s>inven_cmds({ObjectPtr what}, {int inven_cmd}, {int slotNum})
item_caps_total<d>[int] Returns current amount of money in inventory of object.<s>item_caps_total({ObjectPtr obj})
obj_carrying_pid_obj<d>[ObjectPtr] Returns a pointer to an object with pid that is in who object.<s>obj_carrying_pid_obj({ObjectPtr who}, {int pid})
obj_is_carrying_obj_pid<d>[int] Returns number of objects from pid that are in obj object inventory.<s>obj_is_carrying_obj_pid({ObjectPtr obj}, {int pid})
<m->
<m+>Objects operations
drop_obj<d>[void] Order to critter, in script of which this function is performed, to drop object to ground.<s>drop_obj({ObjectPtr obj});<cr>
inven_unwield<d>[void] Command to critic to remove any weapons/items from both hands.<s>inven_unwield({ObjectPtr who});<cr>
obj_drop_everything<d>[void] Team of critic to throw all items from inventory to his feet.<s>obj_drop_everything({ObjectPtr who});<cr>
pickup_obj<d>[void] The script, in script of which this function is called, lifts object from ground.<s>pickup_obj({ObjectPtr obj});<cr>
wield_obj_critter<d>[void] Equips who is obj object.<s>wield_obj_critter({ObjectPtr who}, {ObjectPtr obj});<cr>
<m->
<m+>Macros
inven_count<d>[int] Returns number of items in inventory.<s>inven_count({ObjectPtr what})
inven_ptr<d>[void] Returns a pointer to an object in specified slot.<s>inven_ptr({ObjectPtr what}, {int slotNum});<cr>
wield_obj<d>[void] Arming critter, in script which is called, object (obj).<s>wield_obj({ObjectPtr obj});<cr>
self_caps<d>[int] Returns amount of money in inventory of object.<s>self_caps
self_item<d>[ObjectPtr] Returns a pointer to an object with prototype identifier pid, located object.<s>self_item({int pid})
self_item_count<d>[int] Returns number of objects with prototype identifier pid that are in inventory of object.<s>self_item_count({int pid})
dude_caps<d>[int] Returns current amount of money in player's inventory.<s>dude_caps
dude_item<d>[ObjectPtr] Returns a pointer to an object with prototype identifier pid, which is in player's inventory.<s>dude_item({int pid})
dude_item_count<d>[int] Returns number of objects with prototype identifier pid that are in player's inventory.<s>dude_item_count({int pid})
critter_is_armed<d>[Boolean] Checks slots of weapons of critter, presence of an installed in this weapon.<s>critter_is_armed({ObjectPtr who})
critter_wearing_armor<d>[Boolean] Checks for availability of installed armor in slot.<s>critter_wearing_armor({ObjectPtr who})
dude_is_armed<d>[Boolean] Checks player's weapon slots, for presence of weapons installed in it.<s>dude_is_armed
dude_wearing_armor<d>[Boolean] Checks player for installed armor in slot.<s>dude_wearing_armor
<m+>Checking items
dude_wielding_knife<d>[Boolean] Checks weapon slots from player for items related to standard knives.<s>dude_wielding_knife
dude_wearing_leather_armor<d>[Boolean] Checks slot, for player's armor (Type LEATHER).<s>dude_wearing_leather_armor
dude_wearing_combat_armor<d>[Boolean] Checks slot, for player's armor (Type COMBAT).<s>dude_wearing_combat_armor
dude_wearing_metal_armor<d>[Boolean] Checks slot, for player's armor (Type METAL).<s>dude_wearing_metal_armor
dude_wearing_power_armor<d>[Boolean] Checks slot for player's armor (Type POWER).<s>dude_wearing_power_armor
<m->
<m>Random checks
do_check<d>[int] Performs a random check ("roll die") on main characteristics of critter.<s>do_check({ObjectPtr who}, {int check}, {int modifier})
how_much<d>[int] Returns an estimate of result of a random check ("throwing a cube").<s>how_much(0)
is_critical<d>[Boolean] Checks whether result of a random check ("throwing a dice") is critical.<s>is_critical({int val})
is_success<d>[Boolean] Checks whether result of a random check ("dice roll") is successful.<s>is_success(int val)
roll_vs_skill<d>[int] Performs a random check ("roll a dice") on skills.<s>roll_vs_skill({ObjectPtr who}, {int skill}, {int modifier})
using_skill<d>[Boolean] Checking for use of active skills.<s>using_skill({ObjectPtr who}, {int skill})
<m+>Macros
skill_success<d>[Boolean] Checks whether result of test is successful.<s>skill_success({ObjectPtr who},{int skill},{int modifier})
stat_success<d>[Boolean] Checks whether result of a validation test is successful.<s>stat_success({ObjectPtr who},{int stat},{int modifier})
<m->
<m>Local map
<m+>Location objects on map
critter_attempt_placement<d>[int] Arrange critter at a given position.<s>critter_attempt_placement({ObjectPtr who}, {int hex}, {int elev});<cr>
elevation<d>[int] Returns level (floor) on which given object is located.<s>elevation({ObjectPtr obj})
move_to<d>[int] Move item.<s>move_to({ObjectPtr obj}, {int tile_num}, {int elev});<cr>
obj_can_hear_obj<d>[Boolean] Check if one object can hear another object.<s>obj_can_hear_obj({ObjectPtr src_obj}, {ObjectPtr dst_obj})
obj_can_see_obj<d>[Boolean] Checking if one object can see another object.<s>obj_can_see_obj({ObjectPtr src_obj}, {ObjectPtr dst_obj})
rotation_to_tile<d>[int] Direction to hex destTile from hex srcTile.<s>rotation_to_tile({int srcTile}, {int destTile})
tile_contains_obj_pid<d>[Boolean] Check if given hex contains an object with a given PID.<s>tile_contains_obj_pid({int tile}, {int elev}, {int pid})
tile_contains_pid_obj<d>[ObjectPtr] Returns a pointer to first object that is on specified hex.<s>tile_contains_pid_obj({int tile}, {int elev}, {int pid})
tile_distance<d>[int] Returns distance between two hexes.<s>tile_distance({int tile1}, {int tile2})
tile_distance_objs<d>[int] Returns distance between two objects.<s>tile_distance_objs({ObjectPtr obj1}, {ObjectPtr obj2})
tile_in_tile_rect<d>[Boolean] Checks affiliation of a tile points to a rectangle.<s>tile_in_tile_rect({int tileLeft}, {int tileTop}, {int tileBottom}, {int tileRight}, {int tile})
tile_num<d>[int] Returns hex number of object on which object is located.<s>tile_num({ObjectPtr obj})
tile_num_in_direction<d>[int] The number of hex located at a given distance in a given direction from specified hex.<s>tile_num_in_direction({int start_tile}, {int dir}, {int distance})
tile_get_next_critter<d>[ObjectPtr] Returns a pointer to next critter on a given hex.<s>tile_get_next_critter({int tile_num}, {int elev}, {ObjectPtr last_critter})
<m->
<m+>Map options
cur_map_index<d>[int] Index of current map.<s>cur_map_index
cur_town<d>[int] Current city index.<s>cur_town
days_since_visited<d>[int] Number of days since player last visited maps.<s>days_since_visited
is_loading_game<d>[Boolean] Check if game is currently loading.<s>is_loading_game
load_map<d>[void] Loading specified map.<s>load_map({string map_name}, {int start_location});<cr>
map_first_run<d>[Boolean] Check if current card is being launched for first time.<s>map_first_run
map_is_known<d>[Boolean] Checks if a map with a given index is known.<s>map_is_known({int mapNum})
override_map_start<d>[void] Force position of player when loading map.<s>override_map_start({int x}, {int y}, {int elev}, {int rot});<cr>
set_exit_grids<d>[void] Specify parameters for all exit points at specified level of loaded map.<s>set_exit_grids({int markElev}, {int mapID}, {int elevation}, {int tileNum}, {int rotation});<cr>
set_light_level<d>[void] Set illumination level of map.<s>set_light_level({int level});<cr>
set_map_music<d>[void] Sets background music for specified map.<s>set_map_music({int MapIndex}, {string sfxFileName});<cr>
set_map_start<d>[void] Force position of player next time map is loaded.<s>set_map_start({int x}, {int y}, {int elev}, {int rot});<cr>
tile_is_visible<d>[Boolean] Check to see whether specified tile.<s>tile_is_visible({int tile})
tile_set_center<d>[void] Center screen on a given tile.<s>tile_set_center({int tileNum});<cr>
town_known<d>[Boolean] Indicates whether specified city is open on global map.<s>town_known({int townArea})
mark_map_entrance_state<d>[int] Set input status of card (off/on) for all levels.<s>mark_map_entrance_state({int map_idx}, {int state});<cr>
mark_map_entrance_elev_state<d>[int] Set input status of card (off/on) for specified level.<s>mark_map_entrance_elev_state({int map_idx}, {int elev}, {int state});<cr>
<m->
<m+>Car
car_current_town<d>[int] Returns number of city on which car is located.<s>car_current_town
car_give_to_party<d>[int] The team put player and party members in car and open world map.<s>car_give_to_party;<cr>
car_give_gas<d>[int] Fill car with a specified amount of fuel.<s>car_give_gas(int amount);<cr>
set_car_carry_amount<d>[int] Set maximum load weight for car.<s>set_car_carry_amount({int amount});<cr>
car_carry_amount<d>[int] Returns maximum load weight for car.<s>car_carry_amount
car_out_of_fuel<d>[Boolean] Checks whether car is fueled.<s>car_out_of_fuel
dude_has_car<d>[Boolean] Checks if player has a car.<s>dude_has_car
<m->
<m+>Special objects operations on map
kill_critter<d>[void] Kill critter and determine image for dead body.<s>kill_critter({ObjectPtr obj}, {int death_frame});<cr>
kill_critter_type<d>[void] Kills all critters with a given PID and defines an image for dead bodies.<s>kill_critter_type({int pid}, {int death_frame});<cr>
<m->
<m+>Macros
override_map_start_hex<d>[void] Force position of player when loading map.<s>override_map_start_hex({int tile_num}, {int elev}, {int rot});<cr>
map_get_load_area<d>[int] Returns loaded city map number.<s>map_get_load_area
tile_behind_obj<d>[int] Returns tile number behind critter.<s>tile_behind_obj({ObjectPtr who})
tile_behind_obj_rng<d>[int] Returns tile number behind critter, at a certain distance.<s>tile_behind_obj_rng({ObjectPtr who}, {int val})
self_cur_rot<d>[int] Returns direction of view (0...5) of object.<s>self_cur_rot
self_inv_rot<d>[int] Returns inverted viewing direction (0...5) of object.<s>self_inv_rot
self_tile<d>[int] Returns tile on which object is located.<s>self_tile
self_elevation<d>[int] Returns level at which object is located.<s>self_elevation
self_visible<d>[Boolean] Checks whether an object is visible.<s>self_visible
self_can_see_dude<d>[Boolean] Check to see if critter, player.<s>self_can_see_dude
self_distance_from_dude<d>[int] Returns distance between player and critter.<s>self_distance_from_dude
dude_cur_rot<d>[int] Returns direction of player's view (0...5)<s>dude_cur_rot
dude_inv_rot<d>[int] Returns player's inverted direction of view.<s>dude_inv_rot
dude_tile<d>[int] Returns tile number of player.<s>dude_tile
dude_elevation<d>[int] Returns level at which player is located.<s>dude_elevation
dude_can_see_self<d>[Boolean] Checks whether player sees object in script that command is executing.<s>dude_can_see_self
<m->
<m>World map
<m+>World coordinates
mark_world_subtile_visited<d>[void] Mark tile of world map as visited.<s>mark_world_subtile_visited({int xPos}, {int yPos}, {int radius});<cr>
wm_area_set_pos<d>[void] Set world coordinates for specified city.<s>wm_area_set_pos({int areaIdx}, {int xPos}, {int yPos});<cr>
wm_get_subtile_state<d>[int] Tile state of world map.<s>wm_get_subtile_state({int xPos},{int yPos})
worldmap_xpos<d>[int] Returns X coordinate of current location on world map.<s>worldmap_xpos
worldmap_ypos<d>[int] Returns Y coordinate of current location on world map.<s>worldmap_ypos
<m->
<m+>Cities on world map
mark_area_known<d>[void] Set Location Status.<s>mark_area_known({int mark_type}, {int area}, {int mark_state});<cr>
<m->
<m+>Transition city/world
town_map<d>[void] Request to goto city map.<s>town_map;<cr>
world_map<d>[void] Request to goto world map.<s>world_map;<cr>
<m->
<m+>Macros
mark_on_map<d>[void] Mark city on world map.<s>mark_on_map({int area});<cr>
unmark_on_map<d>[void] Do not mark a city on world map.<s>unmark_on_map({int area});<cr>
<m->
<m>Combat mode
attack<d>[void] Causes critter, in script of which command is called, to attack specified object.<s>attack({ObjectPtr who});<cr>
attack_complex<d>[void] Causes critter, in script which is called, to attack specified object with different modifiers.<s>attack_complex({ObjectPtr who}, {int called_shot}, {int num_attacks}, {int bonus}, {int min_damage}, {int max_damage}, {int attacker_results}, {int target_results});<cr>
attack_setup<d>[void] Causes specified critter to attack another object.<s>attack_setup({ObjectPtr who}, {ObjectPtr victim});<cr>
combat_is_initialized<d>[Boolean] Checking combat mode.<s>combat_is_initialized
terminate_combat<d>[void] Command to combat system stop fight.<s>terminate_combat;<cr>
<m+>Macros
self_attack_dude<d>[void] Causes critter to attack player or run away depending on state of flag FLEE.<s>self_attack_dude;
<m->
<m>Text/Dialog/Barter
<m+>Text messages
message_str<d>[string] Returns message string to file number.<s>message_str({int msg_list}, {int msg_num})
display_msg<d>[void] Displays message on information screen.<s>display_msg({string message});<cr>
float_msg<d>[void] Create a "floating" message (above critter).<s>float_msg({ObjectPtr who}, {string msg}, {int type});<cr>
debug_msg<d>[void] Outputs a debugging message to message window.<s>debug_msg({string text});<cr>
<m->
<m+>Dialogue mode
dialogue_reaction<d>[void] Animates emotional reaction in dialogue<s>dialogue_reaction({int mood});<cr>
dialogue_system_enter<d>[void] Forced enter dialog system<s>dialogue_system_enter;<cr>
end_dialogue<d>[void] End dialog<s>end_dialogue;<cr>
giq_option<d>[void] Display answer in dialog<s>giq_option({int iq_test}, {int msg_list}, {int msg_num}, {procedure target}, {int reaction});<cr>
gsay_message<d>[void] Displays a replica of NPC that does not imply any response from player<s>gsay_message({int msg_list}, {int msg_num}, {int reaction});<cr>
gsay_option<d>[void] Display answer in dialog without checking intelligence<s>gsay_option({int msg_list}, {int msg_num}, {procedure target}, {int reaction});<cr>
gsay_reply<d>[void] Displays a replica of NPS<s>gsay_reply({int msg_list}, {int msg_num});<cr>
start_gdialog<d>[void] To start a dialogue<s>start_gdialog({int msgFileNum}, {ObjectPtr who}, {int mood}, {int headNum}, {int backgroundIdx});<cr>
gsay_start<d>[void] Is placed before function call begins dialogue<s>gsay_start;<cr>
gsay_end<d>[void] Is placed after a function call, begins dialogue<s>gsay_end;<cr>
<m->
<m+>Barter mode
gdialog_mod_barter<d>[void] Entering barter mode with specified modifier<s>gdialog_mod_barter({int modifier});<cr>
gdialog_set_barter_mod<d>[void] Sets current value of barter modifier<s>gdialog_set_barter_mod({int mod});<cr>
critter_can_barter<d>[Boolean] Check for ability to trade with critter<s>critter_can_barter({ObjectPtr who})
<m->
<m+>Macros
mstr<d>[string] Returns message string from a predefined file<s>mstr({int msg_num})
display_mstr<d>[void] Displays a message on information screen<s>display_mstr({int msg_num});<cr>
g_mstr<d>[string] Returns message string from a file standard messages<s>g_mstr({int msg_num})
display_g_mstr<d>[void] Displays a message on information screen, from file of standard messages<s>display_g_mstr({int msg_num});<cr>
display_mstr_rand<d>[void] Displays a random message from range (min,max) on information screen, from a pre-specified file<s>display_mstr_rand({int msg_num_min},{int msg_num_max});<cr>
floater<d>[void] Creates a "floating" message above object in script that is called<s>floater({int msg_num});<cr>
floater_rand<d>[void] Creates a random "floating" message above object in script that is called<s>floater_rand({int min_msg_num}, {int max_msg_num});<cr>
gen_floater<d>[void] Displays of standard "floating" message<s>gen_floater({ObjectPtr who}, {int msg_num});<cr>
dude_floater<d>[void] Creates a "floating" message above player<s>dude_floater({int msg_num});<cr>
dude_floater_rand<d>[void] Creates a random "floating" message above player<s>dude_floater_rand({int msg_num_min},{int msg_num_max});<cr>
dude_floater_type<d>[void] Creates a "floating" message with a given color (type) above player<s>dude_floater_type({int msg_num},{int type});<cr>
self_floater_type<d>[void] Creates a "floating" message with a specified color (type) above object in which script is executed<s>self_floater_type({int msg_num},{int type});<cr>
GOption<d>[void] Displays a response with a positive emotional response<s>GOption({int msg_num}, {procedure target}, {int iq_test});<cr>
NOption<d>[void] Displays a response with a neutral emotional response<s>NOption({int msg_num}, {procedure target}, {int iq_test});<cr>
BOption<d>[void] Displays a response with a negative emotional reaction<s>BOption({int msg_num}, {procedure target}, {int iq_test});<cr>
GLowOption<d>[void] Displays an answer with a positive emotional reaction for a character with a low intelligence<s>GLowOption({int msg_num}, {procedure target});<cr>
NLowOption<d>[void] Displays a response option with a neutral emotional response for a character with a low intelligence.<s>NLowOption({int msg_num}, {procedure target});<cr>
BLowOption<d>[void] Displays a response with a negative emotional response for a character with a low intelligence.<s>BLowOption({int msg_num}, {procedure target});<cr>
GMessage<d>[void] Displays a replica of an NPC with a positive emotional response that does not require a response from player<s>GMessage({int msg_num});<cr>
NMessage<d>[void] Displays a replica of NPC with a neutral emotional reaction that does not require a response from player<s>NMessage({int msg_num});<cr>
BMessage<d>[void] Displays a replica of an NPC with a negative emotional reaction that does not require a response from player<s>BMessage({int msg_num});<cr>
Reply<d>[void] Displays a replica of NPC from msg-file of script in which it is called<s>Reply({int msg_num});<cr>
Reply_Rand <d>[void] Displays a random replica of NPS from specified range<s>Reply_Rand({int msg_num_start}, {int msg_num_end});<cr>
gdialog_barter<d>[void] Entering barter mode<s>gdialog_barter;<cr>
start_dialogue<d>[void] Start dialogue<s>start_dialogue({ObjectPtr who}, {int mood});<cr>
<m->
<m>Party members
party_add<d>[void] Attaches party members to player<s>party_add({ObjectPtr who});<cr>
party_member_obj<d>[ObjectPtr] Returns a pointer to a party by PID<s>party_member_obj({int pid});<cr>
party_member_count<d>[int] Returns number of party members in player's team<s>party_member_count({int countHidden})
party_remove<d>[void] Detaches party members from player<s>party_remove({ObjectPtr who});<cr>
<m>Global events and properties
<m+>User interface
game_ui_disable<d>[void] Block user interface<s>game_ui_disable;<cr>
game_ui_enable<d>[void] Unlock user interface<s>game_ui_enable;<cr>
game_ui_is_disabled<d>[Boolean] Checking state of user interface<s>game_ui_is_disabled
<m->
<m+>Videos
endgame_movie<d>[void] Play final video<s>endgame_movie;<cr>
endgame_slideshow<d>[void] Play final slideshow<s>endgame_slideshow;<cr>
play_gmovie<d>[void] Play video<s>play_gmovie({int movieNum});<cr>
<m->
<m+>Fade screen
gfade_in<d>[void] Screen recovery after fade<s>gfade_in(1);<cr>
gfade_out<d>[void] Screen fade<s>gfade_out(1);<cr>
<m->
<m+>Global rules
metarule<d>[int] Function for working with a set of game parameters<s>metarule({int meta_switch}, {int meta_par})
metarule3<d>[int] Another function to work with a variety of game parameters<s>metarule3({int meta3_switch}, {int meta3_par1}, {int meta3_par2}, {int meta3_par3})
<m->
<m+>Game settings
combat_difficulty<d>[int] Returns combat complexity value specified in game settings<s>combat_difficulty
difficulty_level<d>[int] Returns complexity value of game specified in settings<s>difficulty_level
language_filter_is_on<d>[Boolean] Checking filter<s>language_filter_is_on
violence_filter_setting<d>[int] Current level of violence<s>violence_filter_setting
running_burning_guy<d>[int] Returns value running-burning-guy, set in game settings<s>running_burning_guy
<m->
<m+>Macros
elevator<d>[void] Call up elevator window with specified ID<s>elevator({int typeID});<cr>
signal_end_game<d>[void] Signal system to end game<s>signal_end_game;<cr>
weapon_dmg_type<d>[int] Returns type of damage caused by specified weapon<s>weapon_dmg_type({ObjectPtr weapon})
critter_kill_type<d>[int] Returns type of killer by type of kill<s>critter_kill_type({ObjectPtr who})
art_change_fid_num<d>[int] Change FID base number (frame ID)<s>art_change_fid_num({ObjectPtr who}, {int fid});<cr>
<m->
<m>Game time
game_ticks<d>[int] Convert seconds -> ticks<s>game_ticks({int seconds})
game_time<d>[int] Returns current game time (the elapsed time from beginning of game) in ticks<s>game_time
game_time_advance<d>[void] Increases game time by a given number of ticks<s>game_time_advance({int amount});<cr>
game_time_hour<d>[int] Returns current time in HHMM format<s>game_time_hour
game_time_in_seconds<d>[int] Returns elapsed time from beginning of game in seconds<s>game_time_in_seconds
get_day<d>[int] Returns current number day<s>get_day
get_month<d>[int] Returns current month<s>get_month
<m+>Macros
game_time_advance_hour<d>[void] Increases and sets playing time in format HH:MM<s>game_time_advance_hour({HH:MM});<cr>
amt_time_has_passed<d>[int] Returns actual passed time in ticks, in selected time units(time_units)<s>amt_time_has_passed({old_time}, {time_unit})
GAME_TIME_IN_YEARS<d>[int] Returns elapsed time from beginning of game in years<s>GAME_TIME_IN_YEARS
GAME_TIME_IN_DAYS<d>[int] Returns elapsed time from beginning of game to count days<s>GAME_TIME_IN_DAYS
GAME_TIME_IN_HOURS<d>[int] Returns elapsed time from beginning of game in hours<s>GAME_TIME_IN_HOURS
GAME_TIME_IN_MINUTES<d>[int] Returns elapsed time from beginning of game in minutes<s>GAME_TIME_IN_MINUTES
one_second_passed<d>[boolean] Checks condition if one second has elapsed from specified time<s>one_second_passed({old_time_tiks})
one_minute_passed<d>[boolean] Check if condition has passed one minute from specified time<s>one_minute_passed({old_time_tiks})
one_hour_passed<d>[boolean] Checks condition if one hour has elapsed from specified time<s>one_hour_passed({old_time_tiks})
one_day_passed<d>[boolean] Checks condition if one day has elapsed from specified time<s>one_day_passed({old_time_tiks})
one_week_passed<d>[boolean] Checks condition if one week has elapsed from specified time<s>one_week_passed({old_time_tiks})
one_month_passed<d>[boolean] Checks condition if one month has elapsed from specified time<s>one_month_passed({old_time_tiks})
<m->
<m>Animation and sound
<m+>Common Functions
anim_action_frame<d>[int] Returns animation of action from specified animation of object<s>anim_action_frame({ObjectPtr who}, {int frame});<cr>
anim_busy<d>[boolean] Checking state of object animation<s>anim_busy({ObjectPtr who})
art_anim<d>[void] Returns animation number by given FID<s>art_anim({int fid});<cr>
<m->
<m+>Single animations
anim<d>[void] Plays specified animation for specified object in specified direction<s>anim({ObjectPtr who}, {int anim}, {int direction});<cr>
animate_move_obj_to_tile<d>[void] Animating movement of an object to a given tile<s>animate_move_obj_to_tile({ObjectPtr who}, {int tile}, {int speed});<cr>
animate_stand_obj<d>[void] Plays animation with number 0 for specified object<s>animate_stand_obj({ObjectPtr obj});<cr>
animate_stand_reverse_obj<d>[void] Plays an animation with number 0 for given object reverse<s>animate_stand_reverse_obj({ObjectPtr obj});<cr>
explosion<d>[void] Make explosion<s>explosion({int where}, {int elevation}, {int damage});<cr>
<m->
<m+>Group animations
reg_anim_animate<d>[void] Adds a single animation to queue<s>reg_anim_animate({ObjectPtr what}, {int anim}, {int delay});<cr>
reg_anim_animate_forever<d>[void] Adds a single animation to queue, which will run "forever"<s>reg_anim_animate_forever({ObjectPtr what}, {int anim}, {int delay});<cr>
reg_anim_animate_reverse<d>[void] Adds a single animation to queue, which will be played "reverse"<s>reg_anim_animate_reverse({ObjectPtr what}, {int anim}, {int delay});<cr>
reg_anim_func<d>[void] Working with list of animations<s>reg_anim_func({int par1}, {int par2});<cr>
reg_anim_obj_move_to_obj<d>[void] Adds to animation queue an object going to another object<s>reg_anim_obj_move_to_obj({ObjectPtr who}, {ObjectPtr dest_obj}, {int delay});<cr>
reg_anim_obj_run_to_obj<d>[void] Adds an animation of running of one object to another<s>reg_anim_obj_run_to_obj({ObjectPtr who}, {ObjectPtr dest_obj}, {int delay});<cr>
reg_anim_obj_move_to_tile<d>[void] Adds to animation queue an object that goes to specified tile<s>reg_anim_obj_move_to_tile({ObjectPtr who}, {int dest_tile}, {int delay});<cr>
reg_anim_obj_run_to_tile<d>[void] Adds to animation queue an object running to specified tile<s>reg_anim_obj_run_to_tile({ObjectPtr who}, {int dest_tile}, {int delay});<cr>
<m->
<m+>Sound
play_sfx<d>[void] Plays specified sound effect<s>play_sfx({string sfxFileName});<cr>
sfx_build_char_name<d>[string] Generates a string - name of acm file that is used by reg_anim_play_sfx<s>sfx_build_char_name({ObjectPtr who}, {int anim_num}, {int gsound_character_extra});<cr>
sfx_build_weapon_name<d>[string] Generates a string - name of acm file that is used by reg_anim_play_sfx<s>sfx_build_weapon_name({int gsound_sfx_weapon_action_type}, {ObjectPtr what}, {int hit_mode}, {ObjectPtr who});<cr>
reg_anim_play_sfx<d>[void] Adds to queue playing sound effect<s>reg_anim_play_sfx({ObjectPtr who}, {string sfx_name}, {int delay});<cr>
<m->
<m+>Macros
animate_move_to_tile<d>[void] Animation "go to a given tile"<s>animate_move_to_tile({int tile});<cr>
animate_move_to_tile_force<d>[void] Animation "go to a given tile" (the current animation is interrupted)<s>animate_move_to_tile_force({int tile});<cr>
animate_rotation<d>[void] Animation of change of direction of view<s>animate_rotation({int direction});<cr>
animate_run_to_tile<d>[void] Animation of running on a given tile<s>animate_run_to_tile({int tile});<cr>
animate_run_to_tile_force<d>[void] Animation of running on a given tile (the current animation is interrupted)<s>animate_run_to_tile_force({int tile});<cr>
animate_set_frame<d>[void] Replace current animation frame with specified animation<s>animate_set_frame({int newFrame});<cr>
animate_stand<d>[void] Plays animations with number 0<s>animate_stand;<cr>
animate_stand_reverse<d>[void] Plays an animation with number 0 reverse<s>animate_stand_reverse;<cr>
Face_Critter<d>[void] Turn object 1 face to object 2<s>Face_Critter({ObjectPtr Obj1}, {ObjectPtr Obj2});<cr>
reg_anim_begin<d>[void] Start list of animations<s>reg_anim_begin;<cr>
reg_anim_clear<d>[void] Clear Animations List<s>reg_anim_clear({ObjectPtr object});<cr>
reg_anim_end<d>[void] Complete list of animations and start sequence<s>reg_anim_end;<cr>
<m->
<m>Variables games
<m+>Global variables
global_var<d>[int] Returns value of specified global variable<s>global_var({unsigned int var_index})
set_global_var<d>[void] Assign value of global variable<s>set_global_var({unsigned int var_index}, {int value});<cr>
<m->
<m+>Local variables
local_var<d>[int] Returns value of specified local variable<s>local_var({unsigned int var_index})
set_local_var<d>[void] Assign value of a local variable<s>set_local_var({unsigned int var_index}, {int value});<cr>
<m->
<m+>Maps variables
map_var<d>[int] Returns value of specified map variable<s>map_var({unsigned int var_index})
set_map_var<d>[void] Assign a map variable value<s>set_map_var({unsigned int var_index}, {int value});<cr>
<m->
<m+>Macros
inc_global_var_amt<d>[void] Increase value of global variable by number 'amt'<s>inc_global_var_amt({int var_index}, {int amt});<cr>
inc_global_var<d>[void] Increment of global variable<s>inc_global_var({int var_index});<cr>
dec_global_var_amt<d>[void] Decrease value of global variable by number 'amt'<s>dec_global_var_amt({int var_index}, {int amt});<cr>
dec_global_var<d>[void] Decrement of global variable<s>dec_global_var({int var_index});<cr>
inc_map_var_amt<d>[void] Increase value of map variable by number 'amt'<s>inc_map_var_amt({int var_index}, {int amt});<cr>
inc_map_var<d>[void] Increment of a variable map<s>inc_map_var({int var_index});<cr>
dec_map_var_amt<d>[void] Decrease value of map variable by number 'amt'<s>dec_map_var_amt({int var_index}, {int amt});<cr>
dec_map_var<d>[void] Decrement of map variable<s>dec_map_var({int var_index});<cr>
inc_local_var_amt<d>[void] Increase value of local variable by number 'amt'<s>inc_local_var_amt({int var_index}, {int amt});<cr>
inc_local_var<d>[void] Increment of a local variable<s>inc_local_var({int var_index});<cr>
dec_local_var_amt<d>[void] Decrease value of local variable by number 'amt'<s>dec_local_var_amt({int var_index}, {int amt});<cr>
dec_local_var<d>[void] Decrement of a local variable<s>dec_local_var({int var_index});<cr>
<m->
<m+>Bitwise operations (macros)
gvar_bit<d>[int] Checking state of specified bit of global variable<s>gvar_bit({int var_index}, {int bit_num})
mvar_bit<d>[int] Checking state of specified bit of map variable<s>mvar_bit({int var_index}, {int bit_num})
lvar_bit<d>[int] Checking state of specified bit of local script variable<s>lvar_bit({int var_index}, {int bit_num})
INV<d>[int] Inversion bit masks<s>INV({int bit_num})
set_gvar_bit_on<d>[void] Set specified bit, global variable<s>set_gvar_bit_on({int var_index}, {int bit_num});<cr>
set_mvar_bit_on<d>[void] Set specified bit, map variable<s>set_mvar_bit_on({int var_index}, {int bit_num});<cr>
set_lvar_bit_on<d>[void] Set specified bit, local script variable<s>set_lvar_bit_on({int var_index}, {int bit_num});<cr>
set_gvar_bit_off<d>[void] Reset specified bit, global variable<s>set_gvar_bit_off({int var_index}, {int bit_num});<cr>
set_mvar_bit_off<d>[void] Reset specified bit, map variable<s>set_mvar_bit_off({int var_index}, {int bit_num});<cr>
set_lvar_bit_off<d>[void] Reset specified bit, local script variable<s>set_lvar_bit_off({int var_index}, {int bit_num});<cr>
<m->
<m>Miscellaneous macros
give_xp<d>[void] Adds amount of experience points to player, with discard of message in information window<s>give_xp({int val});<cr>
Flee_From_Dude<d>Causes script in script which runs macro to run away from Player.<s>Flee_From_Dude<cr>
Flee_From_Dude_Force<d>Causes script in script which runs macro to run away from Player (interrupting current animation).<s>Flee_From_Dude_Force<cr>
Follow_Dude<d>Causes critter to follow Player if distance is greater than value of X, Y is distance to which critter should be located.<s>Follow_Dude({int X},{int Y})<cr>
Follow_Obj_Run_Only<d>Causes critter to run after object if distance is greater than value of X, Y distance to which critter should run.<s>Follow_Obj_Run_Only({ObjectPtr},{int X},{int Y})<cr>
Get_In_Obj_Face<d>Causes critter to approach object, or turn around to face him.<s>Get_In_Obj_Face({ObjectPtr})<cr>
Get_In_Face_Run_Dist<d>Causes critter to run to object at a certain distance, or turn around to face him.<s>Get_In_Face_Run_Dist({ObjectPtr},{int Dist})<cr>
closest_clear_tile<d>Search for a free tile along line from specified tile towards object, and writes it to variable X.<s>closest_clear_tile({ObjectPtr}, {int Tile}, {var X})<cr>
Lighting<d>Set lighting of map, depending on time of day.<s>Lighting;<cr>
Check_Create_Car<d>Checking and setting car on map<s>Check_Create_Car({int HexNum}, {int MapElevation})<cr>
<->
<m>Interface Functions
<m+>Windows
CreateWin<d>[void] Create Window<s>CreateWin({string win_name}, {int x}, {int y}, {int width}, {int height});<cr>
DeleteWin<d>[void] Delete specified window<s>DeleteWin({string win_name});<cr>
SelectWin<d>[void] Set active window<s>SelectWin({string win_name});<cr>
ShowWin<d>[void] Show active window<s>ShowWin;<cr>
ScaleWin<d>[void] Changes position and size of window with scaling of content of window<s>ScaleWin({string win_name}, {int x}, {int y}, {int width}, {int height});<cr>
ResizeWin<d>[void] Changes position and size of window with scaling of contents of window<s>ResizeWin({string win_name}, {int x}, {int y}, {int width}, {int height});<cr>
<m->
<m+>Graphics
LoadPaletteTable<d>[void] Loadind global palette<s>LoadPaletteTable({string palfilename});<cr>
Display<d>[void] Display pcx in active window<s>Display({string pcxfilename});<cr>
DisplayRaw<d>[void] Display pcx in active window<s>DisplayRaw({string pcxfilename});<cr>
DisplayGFX<d>[void] Display pcx in active window<s>DisplayGFX({string pcxfilename}, {int x}, {int y}, {int width}, {int height});<cr>
FillWin3x3<d>[void] Fill picture pcx in active window<s>FillWin3x3({string pcxfilename});<cr>
FillWin<d>[void] Fill active window with specified color<s>FillWin({int R}, {int G}, {int B});<cr>
FillRect<d>[void] Fill in specified color with specified rectangle<s>FillRect({int x}, {int y}, {int width}, {int height}, {int R}, {int G}, {int B});<cr>
<m->
<m+>Buttons
AddButton<d>[void] Create button<s>AddButton({string btn_name}, {int x}, {int y}, {int width}, {int height});<cr>
DeleteButton<d>[void] Delete button<s>DeleteButton({string btn_name});<cr>
AddButtonGFX<d>[void] Add a graphic to button<s>AddButtonGFX({string btn_name}, {string downpcx}, {string uppcx}, {string overpcx});<cr>
AddButtonProc<d>[void] Associate with button procedures for processing events<s>AddButtonProc({string btn_name}, {procedure button_on}, {procedure button_off}, {procedure button_press}, {procedure button_release});<cr>
AddButtonText<d>[void] Add button text<s>AddButtonText({string btn_name}, {string text});<cr>
<m->
<m+>Regions
AddRegion<d>[void] Add custom area<s>AddRegion {string reg_name} {int x0, int y0, int x1, int y1, ...};<cr>
DeleteRegion<d>[void] Delete area<s>DeleteRegion({string reg_name});<cr>
AddRegionProc<d>[void] Associate with area of procedure for handling events<s>AddRegionProc({string reg_name}, {procedure on}, {procedure off}, {procedure press}, {procedure release});<cr>
ActivateRegion<d>[void] Run one of area-related procedures<s>ActivateRegion({string reg_name}, {int reg_proc});<cr>
<m->
<m+>Text function
GotoXY<d>[void] Sets current coordinates<s>GotoXY({int x}, {int y});<cr>
Print<d>[void] Print text with current settings on screen<s>Print({string text});<cr>
Format<d>[void] Print text in specified area<s>Format({string text}, {int x}, {int y}, {int width}, {int height}, {int attrib});<cr>
PrintRect<d>[void] Print text to current coordinates<s>PrintRect({string text}, {int width}, {int tab});<cr>
SetTextColor<d>[void] Sets text color<s>SetTextColor({int R}, {int G}, {int B});<cr>
SetHighlightColor<d>[void] Sets highlight color<s>SetHighlightColor({int R}, {int G}, {int B});<cr>
SetFont<d>[void] Set specifies font<s>SetFont({int font});<cr>
SetTextFlags<d>[void] Sets various flags for the text.<s>SetTextFlags({int flags});<cr>
<m->
<m+>Mouse
HideMouse<d>[void] Hide mouse<s>HideMouse;<cr>
ShowMouse<d>[void] Show mouse<s>ShowMouse;<cr>
MouseShape<d>[void] Changing shape of mouse cursor<s>MouseShape({sting pcxfilename}, {int x}, {int y});<cr>
<m->
<m+>Events
AddNamedHandler<d>[void] Associate an event with a handler procedure<s>AddNamedHandler({string event_name}, {procedure callback_proc});<cr>
AddNamedEvent<d>[void] Associate an event with a handler procedure<s>AddNamedEvent({string event_name}, {procedure callback_proc});<cr>
SignalNamed<d>[void] Call event<s>SignalNamed({string event_name});<cr>
ClearNamed<d>[void] Delete specified event<s>ClearNamed({string event_name});<cr>
<m->
<m+>Sound
SoundPlay<d>[snd_handler] Plays an audio file<s>soundplay({string file}, {int mode});<cr>
SoundDelete<d>[void] Delete (disable) sound created by soundplay<s>sounddelete({snd_handler handler});<cr>
SoundStop<d>[void] Stop playing sound created with soundplay<s>soundstop({snd_handler handler});<cr>
SoundPause<d>[void] Pause sound created with soundplay<s>soundpause({snd_handler handler});<cr>
SoundResume<d>[void] Resume playing sound stopped by soundpause<s>soundresume({snd_handler handler});<cr>
SoundRewind<d>[void] Rewinding to beginning (but effect is not observed)<s>soundrewind({snd_handler handler});<cr>
<m->
<m+>Say-mode
SayStart<d>[void] Enter to dialogue mode<s>SayStart;<cr>
SayEnd<d>[void] Exit from dialogue mode<s>SayEnd;<cr>
SayQuit<d>[void] To set an exit flag from dialogue<s>SayQuit;<cr>
SayGotoReply<d>[void] Goto specified NPC replica<s>SayGotoReply({string reply_name});<cr>
SayReply<d>[void] Display in replica window, replica NPC<s>SayReply({string reply_name}, {string reply_text});<cr>
SayOption<d>[void] Display answer to player's answer window<s>SayOption({string option_text}, {string reply_name});<cr>
SayMessage<d>[void] Display a message in replica window that is removed by clicking<s>SayMessage({string message_title}, {string message_text});<cr>
<m+>Say Mode Settings
SayReplyWindow<d>[void] Set NPC Replica Window Options<s>SayReplyWindow({int x}, {int y}, {int width}, {int height}, {string pcxfilename});<cr>
SayOptionWindow<d>[void] Set window parameters for player responses<s>SayOptionWindow({int x}, {int y}, {int width}, {int height}, {string pcxfilename});<cr>
SayReplyTitle<d>[void] Set caption of NPC replica window<s>SayReplyTitle({string title});<cr>
SayBorder<d>[void] Set indents for output text<s>SayBorder({int x}, {int y});<cr>
SaySetSpacing<d>[void] Set distance between lines of answer options in answer window<s>SaySetSpacing({int spacing});<cr>
SayMessageTimeout<d>[void] Delay in seconds for SayMessage<s>SayMessageTimeout({int delay});<cr>
SetHighlightColor<d>[void] Sets highlight color<s>SetHighlightColor({int R}, {int G}, {int B});<cr>
SayOptionColor<d>[void] Fills player's response window with specified color<s>SayOptionColor({int R}, {int G}, {int B});<cr>
SayReplyColor<d>[void] Fills NPC replica window with specified color<s>SayReplyColor({int R}, {int G}, {int B});<cr>
SayOptionFlags<d>[void] Player response window flags<s>SayOptionFlags({int flags});<cr>
SayReplyFlags<d>[void] NPC Replica Window Flags<s>SayReplyFlags({int flags});<cr>
<m->
<m->
<m+>Keyboard
AddKey<d>[void] Associate specified key with procedure-handler<s>AddKey({char key_code}, {procedure callback_proc});<cr>
DeleteKey<d>[void] Cancel associated procedure for specified key<s>DeleteKey({char key_code});<cr>
<m->
<m+>Miscellaneous
FadeIn<d>[void] Slowly FadeIn screen<s>FadeIn({int delay});<cr>
FadeOut<d>[void] Slowly FadeOut screen<s>FadeOut({int delay});<cr>
SelectFileList<d>[string] Display file selection window<s>SelectFileList({string title}, {string mask});<cr>
<m->
<->
<m>SFALL Functions
<m+>Global scripts
<m+>Hooks Arguments
Get_Sfall_Arg_At<d>[int] Gets the value of hook argument with the specified argument index.<s>get_sfall_arg_at({int argNum})
Get_Sfall_Arg<d>[int] <s>get_sfall_arg;<cr>
Get_Sfall_Args<d>[array] <s>get_sfall_args;<cr>
Set_Sfall_Arg<d>[void] <s>set_sfall_arg({int arg}, {int value});<cr>
Set_Sfall_Return<d>[void] <s>set_sfall_return({int value});<cr>
<m->
Game_Loaded<d>[bool] Returns True first time it is called after a new game or game load, and False any time after.<s>game_loaded
Set_Global_Script_Repeat<d>[void] <s>set_global_script_repeat({int frames});<cr>
Set_Global_Script_Type<d>[void] <s>set_global_script_type({int type});<cr>
Available_Global_Script_Types<d>[int] <s>available_global_script_types
Set_Sfall_Global<d>[void] <s>set_sfall_global({string/int varname}, {int/float value});<cr>
Get_Sfall_Global_Int<d>[int] <s>get_sfall_global_int({string/int varname})
Get_Sfall_Global_Float<d>[float] <s>get_sfall_global_float({string/int varname})
Get_Game_Mode<d>[int] Return a set of flags indicating which mode game is currently in.<s>get_game_mode
Set_Self<d>[void] Overrides scripts self_obj for next function call.<s>set_self({objptr});<cr>
Typeof<d>[int] <s>typeof({any value})
Init_Hook<d>[int] <s>init_hook
Register_Hook<d>[void] <s>register_hook({int hook});<cr>
Register_Hook_Proc<d>[void] <s>register_hook_proc({int hook}, {procedure proc});<cr>
Register_Hook_Proc_Spec [v4.2]<d>[void] <s>register_hook_proc_spec({int hook}, {procedure proc});<cr>
<m->
<m+>Map Features
Sneak_Success<d>[int] <s>sneak_success
Create_Spatial<d>[ObjectPtr] <s>create_spatial({int scriptID}, {int tile}, {int elevation}, {int radius});<cr>
In_World_Map<d>[bool] <s>in_world_map
Force_Encounter<d>[void] <s>force_encounter({int map});<cr>
Force_Encounter_With_Flags<d>[void] <s>force_encounter_with_flags({int map}, {int flags});<cr>
Get_Tile_Fid<d>[int] <s>get_tile_fid({int tile})
Get_Light_Level<d>[int] <s>get_light_level
Tile_Light<d>[int] <s>tile_light({int elevation}, {int tileNum});<cr>
Tile_Under_Cursor<d>[int] <s>tile_under_cursor
Tile_Get_Objs<d>[array] <s>tile_get_objs({int tileNum}, {int elevation});<cr>
Obj_Blocking_Line<d>[ObjectPtr] <s>obj_blocking_line({ObjectPtr objFrom}, {int tileTo}, {int blockingType});<cr>
Obj_Blocking_Tile<d>[ObjectPtr] <s>obj_blocking_tile({int tileNum}, {int elevation}, {int blockingType});<cr>
Path_Find_To<d>[array] <s>path_find_to({ObjectPtr objFrom}, {int tileTo}, {int blockingType});<cr>
Set_World_Map_Pos<d>[void] <s>set_world_map_pos({int x}, {int y});<cr>
Get_World_Map_X_Pos<d>[int] <s>get_world_map_x_pos
Get_World_Map_Y_Pos<d>[int] <s>get_world_map_y_pos
Set_Map_Time_Multi<d>[void] <s>set_map_time_multi({float multi});<cr>
<m->
<m+>Gaming functions
<m+>Combat functions
Block_Combat<d>[void] Deny the player to enter combat mode.<s>block_combat({bool value});<cr>
Get_Attack_Type<d>[int] <s>get_attack_type
Get_Last_Target<d>[objptr] Will return last critter to be deliberately attacked.<s>get_last_target({objptr critter});<cr>
Get_Last_Attacker<d>[objptr] Will return last critter to deliberately launch an attack against argument critter.<s>get_last_attacker({objptr critter});<cr>
Set_Critter_Burst_Disable<d>[void] <s>set_critter_burst_disable({int critter}, {int disable});<cr>
Force_Aimed_Shots<d>[void] <s>force_aimed_shots({int pid});<cr>
Disable_Aimed_Shots<d>[void] <s>disable_aimed_shots({int pid});<cr>
Get_Weapon_Ammo_Pid<d>[int] <s>get_weapon_ammo_pid({objptr weapon});<cr>
Set_Weapon_Ammo_Pid<d>[void] <s>set_weapon_ammo_pid({objptr weapon}, {int pid});<cr>
Get_Weapon_Ammo_Count<d>[int] <s>get_weapon_ammo_count({objptr weapon});<cr>
Set_Weapon_Ammo_Count<d>[void] <s>set_weapon_ammo_count({objptr weapon}, {int count});<cr>
Set_Weapon_Knockback<d>[void] <s>set_weapon_knockback({WeaponPtr}, {int type}, {int/float value});<cr>
Set_Target_Knockback<d>[void] <s>set_target_knockback({CritterPtr}, {int type}, {int/float value});<cr>
Set_Attacker_Knockback<d>[void] <s>set_attacker_knockback({CritterPtr}, {int type}, {int/float value});<cr>
Remove_Weapon_Knockback<d>[void] <s>remove_weapon_knockback({WeaponPtr});<cr>
Remove_Target_Knockback<d>[void] <s>remove_target_knockback({CritterPtr});<cr>
Remove_Attacker_Knockback<d>[void] <s>remove_attacker_knockback({CritterPtr});<cr>
Get_Bodypart_Hit_Modifier<d>[int] <s>get_bodypart_hit_modifier({int bodypart});<cr>
Set_Bodypart_Hit_Modifier<d>[void] <s>set_bodypart_hit_modifier({int bodypart}, {int value});<cr>
Set_Critical_Table<d>[void] <s>set_critical_table({int crittertype}, {int bodypart}, {int level}, {int valuetype}, {int value});<cr>
Get_Critical_Table<d>[int] <s>get_critical_table({int crittertype}, {int bodypart}, {int level}, {int valuetype});<cr>
Reset_Critical_Table<d>[void] <s>reset_critical_table({int crittertype}, {int bodypart}, {int level}, {int valuetype});<cr>
<m->
Get_Year<d>[int] <s>get_year
Get_Uptime<d>[int] Is just a wrapper around windows GetTickCount() function.<s>get_uptime
Set_Pyromaniac_Mod<d>[void] <s>set_pyromaniac_mod({int bonus});<cr>
Set_Swiftlearner_Mod<d>[void] <s>set_swiftlearner_mod({int bonus});<cr>
Set_Hp_Per_Level_Mod<d>[void] <s>set_hp_per_level_mod({int mod});<cr>
Mod_Skill_Points_Per_Level<d>[void] Modifies number of skill points player recieves when they level up.<s>mod_skill_points_per_level({int value});<cr>
Set_Available_Skill_Points<d>[void] <s>set_available_skill_points({int value});<cr>
Get_Available_Skill_Points<d>[int] <s>get_available_skill_points
Set_Pickpocket_Max<d>[void] <s>set_pickpocket_max({int percentage});<cr>
Set_Hit_Chance_Max<d>[void] <s>set_hit_chance_max({int percentage});<cr>
Set_Skill_Max<d>[void] <s>set_skill_max({int value});<cr>
Set_Xp_Mod<d>[void] <s>set_xp_mod({int percentage});<cr>
Set_Inven_Ap_Cost<d>[void] <s>set_inven_ap_cost({int value});<cr>
Set_Unspent_Ap_Bonus<d>[void] <s>set_unspent_ap_bonus({int multiplier});<cr>
Get_Unspent_Ap_Bonus<d>[int] <s>get_unspent_ap_bonus
Set_Unspent_Ap_Perk_Bonus<d>[void] <s>set_unspent_ap_perk_bonus({int multiplier});<cr>
Get_Unspent_Ap_Perk_Bonus<d>[int] <s>get_unspent_ap_perk_bonus
Gdialog_Get_Barter_Mod<d>[int] <s>gdialog_get_barter_mod
Set_Pipboy_Available<d>[void] <s>set_pipboy_available({int available});<cr>
Set_Car_Current_Town<d>[void] <s>set_car_current_town({int town});<cr>
Party_Member_List<d>[array] <s>party_member_list({int includeHidden});<cr>
Obj_Is_Carrying_Obj<d>[int] <s>obj_is_carrying_obj({ObjectPtr invenObj}, {ObjectPtr itemObj});<cr>
Active_Hand<d>[int] <s>active_hand
Toggle_Active_Hand<d>[void] <s>toggle_active_hand;<cr>
Metarule2_Explosions<d>[int] <s>metarule2_explosions({int mode}, {int arg1}, {int arg2});<cr>
<m+>Macros
Get_Inven_Ap_Cost<d>[int] Returns the current AP cost to access the inventory in combat.<s>get_inven_ap_cost
Set_Attack_Explosion_Pattern<d>[void] Set explosion pattern for next explosion animation.<s>set_attack_explosion_pattern({int pattern}, 0);<cr>
Set_Attack_Explosion_Art<d>[void] Set art ID for next explosion animation.<s>set_attack_explosion_art({int frameID}, 0);<cr>
Set_Attack_Explosion_Radius<d>[void] Changes radius at which explosion will hit secondary targets for next attack.<s>set_attack_explosion_radius({int radius});<cr>
Set_Attack_is_Explosion<d>[void] Set next attack as an explosion with damage of specified type.<s>set_attack_is_explosion({int dmgType});<cr>
Set_Attack_is_Explosion_Fire<d>[void] Set next attack as an explosion with a fire type damage.<s>set_attack_is_explosion_fire;<cr>
Set_Explosion_Radius<d>[void] Sets a permanent radius for grenade explosion or for rocket/dynamite explosions.<s>set_explosion_radius(grenade, rocket);<cr>
Get_Explosion_Damage<d>[int] Returns array of the minimum and maximum damage of the explosive item.<s>get_explosion_damage(itemPid);<cr>
Set_Dynamite_Damage<d>[void] Sets the minimum and maximum damage for Dynamite.<s>set_dynamite_damage(minDmg, maxDmg);<cr>
Set_Plastic_Damage<d>[void] Sets the minimum and maximum damage for Plastic Explosives.<s>set_plastic_damage(minDmg, maxDmg);<cr>
Set_Explosion_Max_Targets<d>[void] Sets the maximum number of additional targets for an explosion, valid range: 1..6 (default is 6).<s>set_explosion_max_targets(x);<cr>
<m->
<m->
<m+>Functions Critter/Player
Set_Critter_Pickpocket_Mod<d>[void] Changes maximum chance of success and chance mod for each steal attempt<s>set_critter_pickpocket_mod({CritterPtr}, {int max}, {int mod});<cr>
Set_Base_Pickpocket_Mod<d>[void] <s>set_base_pickpocket_mod({int max}, {int mod});<cr>
Get_Critter_Current_Ap<d>[int] <s>get_critter_current_ap({CritterPtr});<cr>
Set_Critter_Current_Ap<d>[void] <s>set_critter_current_ap({CritterPtr}, {int ap});<cr>
Set_Critter_Hit_Chance_Mod<d>[void] <s>set_critter_hit_chance_mod({CritterPtr}, {int max}, {int mod});<cr>
Set_Base_Hit_Chance_Mod<d>[void] <s>set_base_hit_chance_mod({int max}, {int mod});<cr>
Set_Critter_Skill_Mod<d>[void] <s>set_critter_skill_mod({CritterPtr}, {int max});<cr>
Set_Base_Skill_Mod<d>[void] <s>set_base_skill_mod({int max});<cr>
Set_Pc_Base_Stat<d>[void] <s>set_pc_base_stat({int StatID}, {int value});<cr>
Set_Pc_Extra_Stat<d>[void] <s>set_pc_extra_stat({int StatID}, {int value});<cr>
Get_Pc_Base_Stat<d>[int] <s>get_pc_base_stat({int StatID});<cr>
Get_Pc_Extra_Stat<d>[int] <s>get_pc_extra_stat({int StatID});<cr>
Set_Critter_Base_Stat<d>[void] <s>set_critter_base_stat({CritterPtr}, {int StatID}, {int value});<cr>
Set_Critter_Extra_Stat<d>[void] <s>set_critter_extra_stat({CritterPtr}, {int StatID}, {int value});<cr>
Get_Critter_Base_Stat<d>[int] <s>get_critter_base_stat({CritterPtr}, {int StatID});<cr>
Get_Critter_Extra_Stat<d>[int] <s>get_critter_extra_stat({CritterPtr}, {int StatID});<cr>
Set_Critter_Skill_Points<d>[void] <s>set_critter_skill_points({int critter}, {int skill}, {int value});<cr>
Get_Critter_Skill_Points<d>[int] <s>get_critter_skill_points({int critter}, {int skill});<cr>
Set_Stat_Max<d>[void] <s>set_stat_max({int stat}, {int value});<cr>
Set_Stat_Min<d>[void] <s>set_stat_min({int stat}, {int value});<cr>
Set_Pc_Stat_Max<d>[void] <s>set_pc_stat_max({int stat}, {int value});<cr>
Set_Pc_Stat_Min<d>[void] <s>set_pc_stat_min({int stat}, {int value});<cr>
Set_Npc_Stat_Max<d>[void] <s>set_npc_stat_max({int stat}, {int value});<cr>
Set_Npc_Stat_Min<d>[void] <s>set_npc_stat_min({int stat}, {int value});<cr>
Get_Kill_Counter<d>[int] <s>get_kill_counter({int critterType});<cr>
Mod_Kill_Counter<d>[void] <s>mod_kill_counter({int critterType}, {int amount});<cr>
Inc_Npc_Level<d>[void] <s>inc_npc_level({string npc});<cr>
Get_Npc_Level<d>[int] <s>get_npc_level({string npc});<cr>
<m->
<m+>Animation/Explosion Functions
Art_Exists<d>[int] <s>art_exists({int artFID})
Reg_Anim_Combat_Check<d>[void] <s>reg_anim_combat_check({int enable});<cr>
Reg_Anim_Destroy<d>[void] <s>reg_anim_destroy({objptr object});<cr>
Reg_Anim_Animate_And_Hide<d>[void] <s>reg_anim_animate_and_hide({objptr object}, {int animID}, {int delay});<cr>
Reg_Anim_Light<d>[void] <s>reg_anim_light({objptr object}, {int radius}, {int delay});<cr>
Reg_Anim_Change_Fid<d>[void] <s>reg_anim_change_fid({objptr object}, {int FID}, {int delay});<cr>
Reg_Anim_Take_Out<d>[void] <s>reg_anim_take_out({objptr object}, {int holdFrameID}, {int delay});<cr>
Reg_Anim_Turn_Towards<d>[void] <s>reg_anim_turn_towards({objptr object}, {int tile/targetObj}, {int delay});<cr>
Reg_Anim_Callback<d>[void] Adds the given procedure to an animation sequence-list and executes it in the registered sequence.<s>reg_anim_callback({procedure proc});<cr>
-
<m->
<m+>Arrays
Create_Array<d>[int] <s>create_array({int size}, {int flags});<cr>
Set_Array<d>[void] <s>set_array({int array}, {any element}, {any value});<cr>
Get_Array<d>[any] <s>get_array({int array}, {any element});<cr>
Free_Array<d>[void] <s>free_array({int array});<cr>
Len_Array<d>[int] <s>len_array({int array});<cr>
Resize_Array<d>[void] <s>resize_array({int array}, {int newSize});<cr>
Temp_Array<d>[int] <s>temp_array({int size}, {int flags});<cr>
Fix_Array<d>[void] <s>fix_array({int array});<cr>
Scan_Array<d>[int] <s>scan_array({int array}, {int/float var});<cr>
Array_Key<d>[int] <s>array_key({int array}, {int index});<cr>
Arrayexpr<d>[int] <s>arrayexpr({any key}, {any value});<cr>
Save_Array<d>[void] <s>save_array({any key}, {int array});<cr>
Load_Array<d>[int] <s>load_array({any key});<cr>
List_Begin<d>[int] <s>list_begin({int type});<cr>
List_Next<d>[int] <s>list_next({int listid});<cr>
List_End<d>[void] <s>list_end({int listid});<cr>
List_As_Array<d>[array] <s>list_as_array({int type})
<m+>Array Macros (defines sfall.h)
Create_Array_List<d>[array] Create persistent array list.<s>create_array_list({int size});<cr>
Temp_Array_List<d>[array] Create temporary array list.<s>temp_array_list({int size});<cr>
Create_Array_Map<d>[array] Create persistent array map.<s>create_array_map;<cr>
Temp_Array_Map<d>[array] Create temporary array map.<s>temp_array_map;<cr>
Create_Lookup_Map<d>[array] Creates a "lookup" map in which the values of existing keys are read-only and can't be updated.<s>create_lookup_map;<cr>
Temp_Lookup_Map<d>[array] Creates a temporary "lookup" map in which the values of existing keys are read-only and can't be updated.<s>temp_lookup_map;<cr>
Array_is_Map<d>[bool] Returns True if array is map, False otherwise.<s>array_is_map({int array})
List_Saved_Arrays<d>[array] Returns temp list with names of all arrays saved with save_array in alphabetical order.<s>list_saved_arrays;<cr>
Unsave_Array<d>[void] Removes array from Savegame.<s>unsave_array({int array});<cr>
Is_in_Array<d>[bool] Returns True if given item exists in given array, False otherwise.<s>is_in_array({int element}, {int array})
Array_Exists<d>[bool] Returns True if given array exists, False otherwise.<s>array_exists({int array})
Clear_Array<d>[void] Remove all elements from array.<s>clear_array({int array});<cr>
Sort_Array<d>[void] Sort array in ascending order.<s>sort_array({int array});<cr>
Sort_Array_Reverse<d>[void] Sort array in descending order.<s>sort_array_reverse({int array});<cr>
Sort_Map_Value<d>[void] Sorts the map in ascending order by key value.<s>sort_map_value({int array});<cr>
Sort_Map_Reverse<d>[void] Sorts the map in descending order by key value.<s>sort_map_reverse({int array});<cr>
Reverse_Array<d>[void] Reverse elements in list.<s>reverse_array({int array});<cr>
Shuffle_Array<d>[void] Randomly shuffle elements in list.<s>shuffle_array({int array});<cr>
Unset_Array<d>[void] Remove element from map or just replace value with 0 for list.<s>unset_array({int array}, {int element});<cr>
<m->
<m->
<m+>Functions Perks/Traits
<m+>Settings perk
Set_Perk_Name<d>[void] <s>set_perk_name({int perkID}, {string value});<cr>
Set_Perk_Desc<d>[void] <s>set_perk_desc({int perkID}, {string value});<cr>
Set_Perk_Image<d>[void] <s>set_perk_image({int perkID}, {int value});<cr>
Set_Perk_Ranks<d>[void] <s>set_perk_ranks({int perkID}, {int value});<cr>
Set_Perk_Level<d>[void] <s>set_perk_level({int perkID}, {int value});<cr>
Set_Perk_Stat<d>[void] <s>set_perk_stat({int perkID}, {int value});<cr>
Set_Perk_Stat_Mag<d>[void] <s>set_perk_stat_mag({int perkID}, {int value});<cr>
Set_Perk_Skill1<d>[void] <s>set_perk_skill1({int perkID}, {int value});<cr>
Set_Perk_Skill1_Mag<d>[void] <s>set_perk_skill1_mag({int perkID}, {int value});<cr>
Set_Perk_Type<d>[void] <s>set_perk_type({int perkID}, {int value});<cr>
Set_Perk_Skill2<d>[void] <s>set_perk_skill2({int perkID}, {int value});<cr>
Set_Perk_Skill2_Mag<d>[void] <s>set_perk_skill2_mag({int perkID}, {int value});<cr>
Set_Perk_Str<d>[void] <s>set_perk_str({int perkID}, {int value});<cr>
Set_Perk_Per<d>[void] <s>set_perk_per({int perkID}, {int value});<cr>
Set_Perk_End<d>[void] <s>set_perk_end({int perkID}, {int value});<cr>
Set_Perk_Chr<d>[void] <s>set_perk_chr({int perkID}, {int value});<cr>
Set_Perk_Int<d>[void] <s>set_perk_int({int perkID}, {int value});<cr>
Set_Perk_Agl<d>[void] <s>set_perk_agl({int perkID}, {int value});<cr>
Set_Perk_Lck<d>[void] <s>set_perk_lck({int perkID}, {int value});<cr>
<m->
Set_Perk_Level_Mod<d>[void] <s>set_perk_level_mod({int levels});<cr>
Set_Perk_Freq<d>[void] Set number of levels between getting a new perk.<s>set_perk_freq({int value});<cr>
Set_Fake_Perk<d>[void] <s>set_fake_perk({string name}, {int level}, {int image}, {string desc});<cr>
Set_Fake_Trait<d>[void] <s>set_fake_trait({string name}, {int active}, {int image}, {string desc});<cr>
Set_Selectable_Perk<d>[void] <s>set_selectable_perk({string name}, {int active}, {int image}, {string desc});<cr>
Set_Perkbox_Title<d>[void] <s>set_perkbox_title({string title});<cr>
Hide_Real_Perks<d>[void] <s>hide_real_perks;<cr>
Show_Real_Perks<d>[void] <s>show_real_perks;<cr>
Has_Fake_Perk<d>[int] <s>has_fake_perk({string name});<cr>
Has_Fake_Trait<d>[int] <s>has_fake_trait({string name});<cr>
Perk_Add_Mode<d>[void] <s>perk_add_mode({int type});<cr>
Clear_Selectable_Perks<d>[void] <s>clear_selectable_perks;<cr>
Remove_Trait<d>[void] <s>remove_trait({int traitID});<cr>
Get_Perk_Owed<d>[int] <s>get_perk_owed
Set_Perk_Owed<d>[void] <s>set_perk_owed({int value});<cr>
Get_Perk_Available<d>[int] <s>get_perk_available({int perk});<cr>
Apply_Heaveho_Fix<d>[void] <s>apply_heaveho_fix;<cr>
<m->
<m+>Functions Proto and Script objects
Get_Proto_Data<d>[int] <s>get_proto_data({int pid}, {int offset});<cr>
Set_Proto_Data<d>[void] <s>set_proto_data({int pid}, {int offset}, {int value});<cr>
Set_Script<d>[void] <s>set_script({objptr}, {int scriptid});<cr>
Get_Script<d>[int] <s>get_script({objptr});<cr>
Remove_Script<d>[void] <s>remove_script({objptr});<cr>
<m->
<m+>Text Functions
String_Compare<d>[bool] Compares two strings case-insensitive, and returns True if the two strings are matched (only for English language).<s>string_compare({string str1}, {string str2})
String_Compare_Locale<d>[bool] Compares two strings case-insensitive, and returns True if the two strings are matched.<s>string_compare_locale({string str1}, {string str2}, {int codePage})
String_Split<d>[array] <s>string_split({string text}, {string split})
Atoi<d>[int] <s>atoi({string value})
Atof<d>[float] <s>atof({string value})
Substr<d>[string] <s>substr({string text}, {int start}, {int length})
Strlen<d>[int] <s>strlen({string text})
Sprintf<d>[string] Formats given value using standard syntax of C printf function.<s>sprintf({string format}, {any value})
Charcode<d>[int] <s>charcode({string text})
Message_Str_Game<d>[string] <s>message_str_game({int fileId}, {int messageId})
String_Format<d>[string] Formats given value using standard syntax of C printf function.<s>string_format({string format}, {any val1}, {any val2})
String_ToLower<d>[string] Converts and returns all letters in the given string to the lower case (works only for English letters).<s>string_tolower({string text})
String_ToUpper<d>[string] Converts and returns all letters in the given string to the upper case (works only for English letters).<s>string_toupper({string text})
<m+>Macros (defines sfall.h)
Mstr_Combat<d>[string] Returns text from game file COMBAT.MSG<s>mstr_combat({int fileId})
Mstr_Ai<d>[string] Returns text from game file COMBATAI.MSG<s>mstr_ai({int fileId})
Mstr_Scrname<d>[string] Returns text from game file SCRNAME.MSG<s>mstr_scrname({int fileId})
Mstr_Misc<d>[string] Returns text from game file MISC.MSG<s>mstr_misc({int fileId})
Mstr_Custom<d>[string] Returns text from game file CUSTOM.MSG<s>mstr_custom({int fileId})
Mstr_Inventry<d>[string] Returns text from game file INVENTRY.MSG<s>mstr_inventry({int fileId})
Mstr_Item<d>[string] Returns text from game file ITEM.MSG<s>mstr_item({int fileId})
Mstr_Lsgame<d>[string] Returns text from game file LSGAME.MSG<s>mstr_lsgame({int fileId})
Mstr_Map<d>[string] Returns text from game file MAP.MSG<s>mstr_map({int fileId})
Mstr_Options<d>[string] Returns text from game file OPTIONS.MSG<s>mstr_options({int fileId})
Mstr_Perk<d>[string] Returns text from game file PERK.MSG<s>mstr_perk({int fileId})
Mstr_Pipboy<d>[string] Returns text from game file PIPBOY.MSG<s>mstr_pipboy({int fileId})
Mstr_Quests<d>[string] Returns text from game file QUESTS.MSG<s>mstr_quests({int fileId})
Mstr_Proto<d>[string] Returns text from game file PROTO.MSG<s>mstr_proto({int fileId})
Mstr_Script<d>[string] Returns text from game file SCRIPT.MSG<s>mstr_script({int fileId})
Mstr_Skill<d>[string] Returns text from game file SKILL.MSG<s>mstr_skill({int fileId})
Mstr_Skilldex<d>[string] Returns text from game file SKILLDEX.MSG<s>mstr_skilldex({int fileId})
Mstr_Stat<d>[string] Returns text from game file STAT.MSG<s>mstr_stat({int fileId})
Mstr_Trait<d>[string] Returns text from game file TRAIT.MSG<s>mstr_trait({int fileId})
Mstr_Worldmap<d>[string] Returns text from game file WORLDMAP.MSG<s>mstr_worldmap({int fileId})
<m->
<m->
<m+>Mathematical Functions
Sqrt<d>[float] <s>sqrt({float x})
Abs<d>[float] <s>abs({float x})
Sin<d>[float] <s>sin({float x})
Cos<d>[float] <s>cos({float x})
Tan<d>[float] <s>tan({float x})
Arctan<d>[float] <s>arctan({float x}, {float y})
^ Operator<d>[float/int] Exponentiation. Use as any other arithmetic operator, like 5^(1/3)<s>({int/float base} ^ {int/float power})
Log<d>[float] <s>log({float x})
Exponent<d>[float] <s>exponent({float x})
Round<d>[int] <s>round({float x})
Ceil<d>[int] <s>ceil({float x})
Div<d>[float/int] Unsigned integer division operator.<s>({int/float} div {int/float})
<m+>Macros (sfall.h)
Floor2<d>[int] Works just like vanilla floor function, but returns correct integers for negative values.<s>floor2({float x})
<m->
<m->
<m+>Interface Functions/Sound/Video
Create_Message_Window<d>[void] <s>create_message_window({string message});<cr>
Show_Iface_Tag<d>[void] <s>show_iface_tag({int tag});<cr>
Hide_Iface_Tag<d>[void] <s>hide_iface_tag({int tag});<cr>
Is_Iface_Tag_Active<d>[int] <s>is_iface_tag_active({int tag})
Set_Movie_Path<d>[void] <s>set_movie_path({string filename}, {int movieid});<cr>
Mark_Movie_Played<d>[void] <s>mark_movie_played({int id});<cr>
Play_Sfall_Sound<d>[int] <s>play_sfall_sound({string file}, {int loop});<cr>
Stop_Sfall_Sound<d>[void] <s>stop_sfall_sound({int ptr});<cr>
Stop_Game<d>[void] <s>stop_game;<cr>
Resume_Game<d>[void] <s>resume_game;<cr>
<m->
<m+>Functions Keyboard/Mouse/Screen
Input_Funcs_Available<d>[int] <s>input_funcs_available
Key_Pressed<d>[int] <s>key_pressed({int dxScancode});<cr>
Tap_Key<d>[void] <s>tap_key({int dxScancode});<cr>
Get_Mouse_X<d>[int] <s>get_mouse_x
Get_Mouse_Y<d>[int] <s>get_mouse_y
Get_Mouse_Buttons<d>[int] Returns number of mouse button that is currently pressed.<s>get_mouse_buttons
Get_Window_Under_Mouse<d>[int] <s>get_window_under_mouse
Get_Screen_Width<d>[int] <s>get_screen_width
Get_Screen_Height<d>[int] <s>get_screen_height
Get_Viewport_X<d>[int] <s>get_viewport_x
Get_Viewport_Y<d>[int] <s>get_viewport_y
Set_Viewport_X<d>[void] <s>set_viewport_x({int view_x});<cr>
Set_Viewport_Y<d>[void] <s>set_viewport_y({int view_y});<cr>
Refresh_Pc_Art<d>[void] <s>refresh_pc_art;<cr>
<m->
<m+>Configuration files
Get_Ini_Setting<d>[int] Gets integer value of parameter from specified file ini, in in Fallout game directory.<s>get_ini_setting({string setting})
Get_Ini_String<d>[string] Gets string value of parameter from specified ini file, in Fallout game directory.<s>get_ini_string({string setting})
Modified_Ini<d>[int]<s>modified_ini
<m+>Macros
Set_Ini_Setting<d>[void] Writes an integer or a string value to an ini file in the Fallout directory.<s>set_ini_setting({string setting}, {int/string value});<cr>
Get_Ini_Section<d>[array] Returns an associative array of keys and values for a given INI file and section.<s>get_ini_section({string file}, {string sect})
Get_Ini_Sections<d>[array] Returns an array of names of all sections in a given INI file.<s>get_ini_sections({string file})
<m->
<m->
<m+>Graphic Functions
Graphics_Funcs_Available<d>[bool] <s>graphics_funcs_available
Load_Shader<d>[int] <s>load_shader({string path});<cr>
Free_Shader<d>[void] <s>free_shader({int ID});<cr>
Activate_Shader<d>[void] <s>activate_shader({int ID});<cr>
Deactivate_Shader<d>[void] <s>deactivate_shader({int ID});<cr>
Set_Shader_Int<d>[void] <s>set_shader_int({int ID}, {string param}, {int value});<cr>
Set_Shader_Float<d>[void] <s>set_shader_float({int ID}, {string param}, {float value});<cr>
Set_Shader_Vector<d>[void] <s>set_shader_vector({int ID}, {string param}, {float f1}, {float f2}, {float f3}, {float f4});<cr>
Get_Shader_Version<d>[int] <s>get_shader_version
Set_Shader_Mode<d>[void] <s>set_shader_mode({int mode});<cr>
Force_Graphics_Refresh<d>[void] <s>force_graphics_refresh({bool enabled});<cr>
Get_Shader_Texture<d>[int] <s>get_shader_texture({int ID}, {int texture});<cr>
Set_Shader_Texture<d>[void] <s>set_shader_texture({int ID}, {string param}, {int texID});<cr>
Set_Palette<d>[void] <s>set_palette({string path});<cr>
<m->
<m+>Functions Read/Write/Call/Files
<m+>Virtual files
Fs_Create<d>[int] <s>fs_create({string path}, {int size});<cr>
Fs_Copy<d>[int] <s>fs_copy({string path}, {string source});<cr>
Fs_Find<d>[int] <s>fs_find({string path});<cr>
Fs_Write_Byte<d>[void] <s>fs_write_byte({int id}, {int data});<cr>
Fs_Write_Short<d>[void] <s>fs_write_short({int id}, {int data});<cr>
Fs_Write_Int<d>[void] <s>fs_write_int({int id}, {int data});<cr>
Fs_Write_Float<d>[void] <s>fs_write_float({int id}, {int data});<cr>
Fs_Write_String<d>[void] <s>fs_write_string({int id}, {string data});<cr>
Fs_Write_Bstring<d>[void] <s>fs_write_bstring({int id}, {string data});<cr>
Fs_Read_Byte<d>[int] <s>fs_read_byte({int id});<cr>
Fs_Read_Short<d>[int] <s>fs_read_short({int id});<cr>
Fs_Read_Int<d>[int] <s>fs_read_int({int id});<cr>
Fs_Read_Float<d>[float] <s>fs_read_float({int id});<cr>
Fs_Delete<d>[void] <s>fs_delete({int id});<cr>
Fs_Size<d>[int] <s>fs_size({int id});<cr>
Fs_Pos<d>[int] <s>fs_pos({int id});<cr>
Fs_Seek<d>[void] <s>fs_seek({int id}, {int pos});<cr>
Fs_Resize<d>[void] <s>fs_resize({int id}, {int size});<cr>
<m->
Read_Byte<d>[int] <s>read_byte({int address});<cr>
Read_Short<d>[int] <s>read_short({int address});<cr>
Read_Int<d>[int] <s>read_int({int address});<cr>
Read_String<d>[string] <s>read_string({int address});<cr>
Write_Byte<d>[void] <s>write_byte({int address}, {int value});<cr>
Write_Short<d>[void] <s>write_short({int address}, {int value});<cr>
Write_Int<d>[void] <s>write_int({int address}, {int value});<cr>
Write_String<d>[void] <s>write_string({int address}, {string value});<cr>
Call_Offset_V0<d>[void] <s>call_offset_v0({int address});<cr>
Call_Offset_V1<d>[void] <s>call_offset_v1({int address}, {int arg1});<cr>
Call_Offset_V2<d>[void] <s>call_offset_v2({int address}, {int arg1}, {int arg2});<cr>
Call_Offset_V3<d>[void] <s>call_offset_v3({int address}, {int arg1}, {int arg2}, {int arg3});<cr>
Call_Offset_V4<d>[void] <s>call_offset_v4({int address}, {int arg1}, {int arg2}, {int arg3}, {int arg4});<cr>
Call_Offset_R0<d>[int] <s>call_offset_r0({int address});<cr>
Call_Offset_R1<d>[int] <s>call_offset_r1({int address}, {int arg1});<cr>
Call_Offset_R2<d>[int] <s>call_offset_r2({int address}, {int arg1}, {int arg2});<cr>
Call_Offset_R3<d>[int] <s>call_offset_r3({int address}, {int arg1}, {int arg2}, {int arg3});<cr>
Call_Offset_R4<d>[int] <s>call_offset_r4({int address}, {int arg1}, {int arg2}, {int arg3}, {int arg4});<cr>
<m->
<m+>Metarule Functions & Macros
Attack_Is_Aimed<d>[bool] Returns True if the aimed attack mode is selected.<s>attack_is_aimed
Get_String_Pointer<d>[int] Returns a pointer to a string variable or to a text.<s>get_string_pointer({string text})
Npc_Engine_Level_Up<d>[void] Enables/Disables the engine function automatically increasing the level of party members of the player.<s>npc_engine_level_up({bool toggle});<cr>
Add_Extra_Msg_File<d>[int] Loads the custom message file, and returns the file ID number assigned to it in range from 0x3000 to 0x3FFF.<s>add_extra_msg_file({string fileName});<cr>
Add_Global_Timer_Event<d>[void] Adds a timer event that calls the timed_event_p_proc procedure in the current global script.<s>add_global_timer_event({int time}, {int fixedParam});<cr>
Remove_Timer_Event<d>[void] Removes all timer events with the specified "fixedParam" value for the current global script.<s>remove_timer_event({int fixedParam});<cr>
Remove_All_Timer_Events<d>[void] Clears all set timer events for the current global script.<s>remove_all_timer_events;<cr>
<m+>Objects
Critter_Inven_Obj2<d>[ObjectPtr] Works just like critter_inven_obj, but correctly reports item in player's inactive hand slot.<s>critter_inven_obj2({ObjectPtr obj}, {int type})
Item_Weight<d>[int] Gets the current weight of an object.<s>item_weight({ObjectPtr obj})
Get_Current_Inven_Size<d>[int] Returns the current inventory size of the container or the critter.<s>get_current_inven_size({ObjectPtr obj})
Unwield_Slot<d>[void] Force unequips an item from the specified slot for a critter or the player.<s>unwield_slot({ObjectPtr critter}, {int slot});<cr>
Outlined_Object<d>[ObjectPtr] Returns an object that is currently highlighted by hovering mouse above it.<s>outlined_object
Get_Outline<d>[int] Gets current outline color for an object.<s>get_outline({ObjectPtr obj})
Set_Outline<d>[void] Sets outline color of an object.<s>set_outline({ObjectPtr obj}, {int color});<cr>
Get_Flags<d>[int] Gets current value of object flags (see sfall.h for available flags).<s>get_flags({ObjectPtr obj})
Set_Flags<d>[void] Sets current flags of an object.<s>set_flags({ObjectPtr obj}, {int flags});<cr>
Get_Object_Data<d>[int] Returns the data of the object at the specified offset.<s>get_object_data({ObjectPtr obj}, {int offset})
Set_Object_Data<d>[void] Sets the data by offset for the specified object.<s>set_object_data({ObjectPtr obj}, {int offset}, {int data});<cr>
Set_Drugs_Data<d>[void] Overrides the set parameters of drugs from the configuration file of DrugsFile option.<s>set_drugs_data({int type], {int pid}, {int value});<cr>
Real_Dude_Obj<d>[ObjectPtr] Returns initial pointer to player(dude_obj), after set_dude_obj was used.<s>real_dude_obj
Set_Dude_Obj<d>[void] Take control of a given critter.<s>set_dude_obj({ObjectPtr critter});<cr>
Lock_Is_Jammed<d>[bool] Returns True if the lock (container or door) is currently jammed.<s>lock_is_jammed({ObjectPtr obj})
Unjam_Lock<d>[void] Unjams a lock immediately without having to wait until the next day.<s>unjam_lock({ObjectPtr obj});<cr>
Set_Unjam_Locks_Time<d>[void] Sets the time required to unlock all jammed locks on the map.<s>set_unjam_locks_time({int time});<cr>
Item_Make_Explosive<d>[void] Makes the specified item(pid) an explosive item (as like dynamite or plastic explosives).<s>item_make_explosive({int pid}, {int activePid}, {int min}, {int max});<cr>
Dialog_Obj<d>[ObjectPtr] Returns a pointer to the object(critter) with which the dialogue/trading is conducted.<s>dialog_obj
Loot_Obj<d>[ObjectPtr] Returns a pointer to the object (container, critter) with which the exchange occurs.<s>loot_obj
Obj_Under_Cursor<d>[ObjectPtr] Returns the object under the cursor.<s>obj_under_cursor({bool onlyCritter}, {bool includeDude})
Get_Object_AI_Data<d>[int] Returns the setting value from the AI-packet the specified object.<s>get_object_ai_data({ObjectPtr obj}, {int aiParam})
Set_Unique_ID<d>[int] Assigns a unique ID number to the object and returns it.<s>set_unique_id({ObjectPtr obj})
UnSet_Unique_ID<d>[int] Assign a new ID number generated by the engine to the object and returns it.<s>unset_unique_id({ObjectPtr obj})
<m->
<m+>Fake Perks & Traits
Add_Trait<d>[void] Adds the specified trait to the player.<s>add_trait({int traitID});<cr>
Set_Selectable_Perk_Npc<d>[void] Adds a fake perk to the specified NPC member for selection.<s>set_selectable_perk_npc({objptr npc}, {string name_perk}, {int active}, {int image}, {string desc});<cr>
Set_Fake_Perk_Npc<d>[void] Adds a fake perk to the specified party member NPC.<s>set_fake_perk_npc({objptr npc}, {string name_perk}, {int level}, {int image}, {string desc});<cr>
Set_Fake_Trait_Npc<d>[void] Adds a fake trait to the specified party member NPC.<s>set_fake_trait_npc({objptr npc}, {string name_trait}, {int active}, {int image}, {string desc});<cr>
Has_Fake_Perk_Npc<d>[int] Returns the number of levels of the perk for the specified party member NPC.<s>has_fake_perk_npc({objptr npc}, {string name_perk})
Has_Fake_Trait_Npc<d>[int] Returns the number of levels of the trait for the specified party member NPC.<s>has_fake_trait_npc({objptr npc}, {string name_trait})
<m->
<m+>LocalMap
Exec_Map_Update_Scripts<d>[void] Executes map_update_p_proc for all objects on map and global/hook scripts as well.<s>exec_map_update_scripts;<cr>
Spatial_Radius<d>[int] Return radius of spatial script.<s>spatial_radius({ObjectPtr obj})
Set_Map_Enter_Position<d>[void] Overrides the player's entry position when entering the map through exit grids (works only in map_enter_p_proc).<s>set_map_enter_position({int tile}, {int elev}, {int rot});<cr>
Get_Map_Enter_Position<d>[array] Returns an array of the player's position tile/elevation/rotation when entering the map through exit grids (works only in map_enter_p_proc).<s>get_map_enter_position
Set_Rest_Heal_Time<d>[void] Sets the time interval in minutes for self-healing during resting.<s>set_rest_heal_time({int time});<cr>
Set_Rest_Mode<d>[void] Sets the flags for the rest mode (see RESTMODE_* constants in sfall.h).<s>set_rest_mode({int flags});<cr>
Set_Can_Rest_On_Map<d>[void] Enable/disable rest on the map for the specified level.<s>set_can_rest_on_map({int mapNum}, {int elev}, {bool value});<cr>
Get_Can_Rest_On_Map<d>[int] Returns the set value for the map after using the set_can_rest_on_map function.<s>get_can_rest_on_map({int mapNum}, {int elev})
Objects_In_Radius<d>[array] Returns an array of objects of a type within the specified radius from the given tile.<s>objects_in_radius({int tile}, {int radius}, {int elev}, {int type})
Tile_By_Position<d>[int] Returns the tile number at the x, y position relative to the top-left corner of the game screen.<s>tile_by_position({int x}, {int y})
<m->
<m+>Worldmap
Set_Terrain_Name<d>[void] Overrides the terrain type name for the sub-tile on the world map by the specified coordinates.<s>set_terrain_name({int x}, {int y}, {string text});<cr>
Set_Town_Title<d>[void] Sets a floating text for a town on the world map when hovering the cursor over the player's marker.<s>set_town_title({int areaID}, {string title});<cr>
<m->
<m+>Car
Car_Gas_Amount<d>[int] Returns current amount of fuel in player's car (between 0 and 80000).<s>car_gas_amount
Set_Car_Intface_Art<d>[void] Changes interface art (index in LST file) for car image on worldmap screen.<s>set_car_intface_art({int artIndex});<cr>
<m->
<m+>Interface
Get_Window_Attribute<d>[int] Returns the attribute of the specified interface window by the attr argument.<s>sfall_func2("get_window_attribute", {int winID}, {int attr})
Tile_Refresh_Display<d>[void] Redraws game scene (tiles, walls, objects, etc.)<s>tile_refresh_display;<cr>
Display_Stats<d>[void] Displays(updates) player stats in the inventory screen display window.<s>display_stats;<cr>
Intface_Show<d>[void] Show main interface.<s>intface_show;<cr>
Intface_Hide<d>[void] Hide main interface.<s>intface_hide;<cr>
Intface_is_Hidden<d>[bool] Return True (1), if interface is currently hidden, False(0) otherwise.<s>intface_is_hidden
Intface_Is_Show<d>[int] Returns a value of 1 if the specified interface window is created by the game.<s>intface_is_show{int winID}
Intface_Redraw<d>[void] Redraws main game interface.<s>intface_redraw;<cr>
Inventory_Redraw<d>[void] Redraws the open inventory.<s>inventory_redraw({int invSide});<cr>
Get_Cursor_Mode<d>[int] Returns the current cursor mode.<s>get_cursor_mode
Set_Cursor_Mode<d>[void] Sets the current cursor mode.<s>set_cursor_mode({int mode});<cr>
Add_Iface_Tag<d>[int] Adds one custom box to the current boxes, and returns the number of the added tag.<s>add_iface_tag;<cr>
Set_Iface_Tag_Text<d>[void] Sets the text messages and colors for custom notification boxes to the interface.<s>set_iface_tag_text({int tag}, {string text}, {int color});<cr>
Dialog_Message<d>[void] Displays a message in the NPC response window in dialog or barter screen.<s>dialog_message({string text});<cr>
Create_Win<d>[void] The same as the vanilla CreateWin function, but it creates a window with the MoveOnTop flag.<s>create_win({string winName}, {int x}, {int y}, {int width}, {int height});<cr>
Create_Win_Flag<d>[void] The same as the vanilla CreateWin function, allows to set additional flags for the created window.<s>create_win_flag({string winName}, {int x}, {int y}, {int width}, {int height}, {int flags});<cr>
Set_Window_Flag<d>[void] Changes the specified flag for the created script or game interface window.<s>set_window_flag({int/string winID/Name}, {int flag}, {bool value});<cr>
Draw_Image<d>[void] Displays the specified FRM image in the active created window.<s>draw_image({string/int pathFile/artId}, {int frame}, {int x}, {int y}, {bool noTransparent});<cr>
Draw_Image_Scaled<d>[void] Displays the specified FRM image in the active created window, scaled to the specified size.<s>draw_image_scaled({string/int pathFile/artId}, {int frame}, {int x}, {int y}, {int width}, {int height});<cr>

Get_Text_Width<d>[int] Returns the text width in pixels for the currently set font.<s>get_text_width({string text})
Hide_Window<d>[void] Hides the specified or currently active (selected) script window.<s>hide_window({string winName});<cr>
Show_Window<d>[void] Displays the specified hidden script window (or the one previously hidden) with the "hide_window" function.<s>show_window({string winName});<cr>
Message_Box<d>[int] Creates a dialog box with text and returns the result of pressing the button: 0 - No (Escape), 1 - Yes/Done (Enter).<s>message_box({string text})
<m->
<m+>Misc
Art_Cache_Clear<d>[void] Clears the cache of FRM image files loaded into memory.<s>art_cache_clear;<cr>
Metarule_Exist<d>[bool] Returns True if the specified name of metarule (sfall_funcX) function exists in the current version of sfall.<s>metarule_exist({string metaruleName})
<m->
<m+>Common
Sfall_Func0<d>[any] Universal metarule function.<s>sfall_func0({string funcName})
Sfall_Func1<d>[any] Universal metarule function.<s>sfall_func1({string funcName}, {arg1})
Sfall_Func2<d>[any] Universal metarule function.<s>sfall_func2({string funcName}, {arg1}, {arg2})
Sfall_Func3<d>[any] Universal metarule function.<s>sfall_func3({string funcName}, {arg1}, {arg2}, {arg3})
Sfall_Func4<d>[any] Universal metarule function.<s>sfall_func4({string funcName}, {arg1}, {arg2}, {arg3}, {arg4})
Sfall_Func5<d>[any] Universal metarule function.<s>sfall_func5({string funcName}, {arg1}, {arg2}, {arg3}, {arg4}, {arg5})
Sfall_Func6<d>[any] Universal metarule function.<s>sfall_func6({string funcName}, {arg1}, {arg2}, {arg3}, {arg4}, {arg5}, {arg6})
<m->
<m->
<m+>Common macros (sfall.h)
Party_Member_List_Critters<d>[array] Returns array of current critters party members.<s>party_member_list_critters
Party_Member_List_All<d>[array] Returns array of all current party members.<s>party_member_list_all
<m->
<m+>Misc Functions
Sfall_Ver_Major<d>[int] <s>sfall_ver_major
Sfall_Ver_Minor<d>[int] <s>sfall_ver_minor
Sfall_Ver_Build<d>[int] <s>sfall_ver_build
Eax_Available<d>[int] <s>eax_available
Set_Eax_Environment<d>[void] <s>set_eax_environment({int environment});<cr>
Hero_Select_Win<d>[void] <s>hero_select_win({int});<cr>
Set_Dm_Model<d>[void] <s>set_dm_model({string name});<cr>
Set_Df_Model<d>[void] <s>set_df_model({string name});<cr>
Set_Hero_Race<d>[void] <s>set_hero_race({int style});<cr>
Set_Hero_Style<d>[void] <s>set_hero_style({int style});<cr>
Nb_Create_Char<d>Unused function (reserved)<s>nb_create_char;<cr>
<m->
<->
